feat(plugin-redis): native key-pattern search for key browsing#1657
Merged
Conversation
…full set on export
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
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.
Problem
Applying a filter on a Redis connection did nothing useful. Redis is a key-value store, but it was served the SQL-style
column / operator / valuefilter row, which has no Redis equivalent:SCAN 0 MATCH "*".What this does
Replaces the SQL filter row, for Redis only, with a native key-pattern search field plus a key-type scope bar (the RedisInsight /
redis-cliconvention, and the HIG search-field + scope-bar pattern). Filtering now runs server-side and correctly:user:*,?,[ae]), case-sensitive, passed verbatim toSCAN MATCH.SCAN TYPE(string, hash, list, set, zset, stream).The search criteria persist in the query string and per-table state, so refresh, pagination, and tab restore all re-run the correct query. A user-typed
SCANin the editor still behaves as a single-batch command.TTL and Value filtering are dropped for Redis: there is no server-side primitive for them, and they never worked in the old filter row.
Plugin-declared, not hardcoded
The filter UI is chosen by a new
BrowseFilterDescriptorthat a driver returns via the optionalPluginBrowseFilterProviderprotocol (mirrors the existingdefaultSortHintpattern).nilmeans the SQL filter row, the default for every existing driver. This lets other non-SQL plugins (DynamoDB, Cassandra, Etcd) opt into their own filter UI later.ABI
The new PluginKit file is purely additive (new symbols only), so this needs the
abi-additivelabel and nocurrentPluginKitVersionbump. Redis is a bundled plugin, so the fix ships with the next app release; no registry re-release.Tests
RedisQueryBuilderTests:KEYBROWSEgeneration for raw glob, type scope, combined, command-string quoting, and base-SCAN fallback.TabFilterStateTests:browseSearchaccessor, active-state logic, and back-compat decoding of legacy JSON without the new fields.Notes
Localizable.xcstringsis intentionally not included. A background Xcode build regenerated it mid-work and mixed the new keys with unrelated in-flight strings; the catalog regenerates cleanly on a full build, andString(localized:)falls back to the literal until then.