Merged
Conversation
introduce ProtoFindOpts struct to stay within the 7-argument clippy limit, re-export it from keyspace/mod.rs, fix visibility (pub not pub(crate)), and apply cargo fmt.
1fcfbf1 to
02c1889
Compare
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
adds two cursor-based scan commands for protobuf key discovery:
PROTO.SCAN cursor [MATCH pattern] [COUNT count] [TYPE typename]scans all proto keys with optional message-type and glob-pattern filters — same cursor contract as
SCAN.PROTO.FIND cursor field-path value [MATCH pattern] [TYPE typename] [COUNT count]walks proto keys returning those where a scalar field equals the given value. dot-separated paths supported via the existing field resolver in
schema.rs. non-scalar fields (message, repeated, map) are silently skipped.what was tested
proto_scan_all_keys,proto_scan_type_filter,proto_scan_match_pattern,proto_scan_cursor_consistency,proto_find_scalar_match,proto_find_nested_path,proto_find_type_filter,proto_find_no_match,proto_find_count_paginationcargo clippyandcargo fmtcleandesign considerations
cursor encoding reuses the existing
(shard_id << 48) | positionscheme fromSCAN, so no new cursor infrastructure is needed. field value comparison is string-based afterget_field_str()stringifies the decoded proto value — booleans become"true"/"false", numbers their decimal representation, strings verbatim. this avoids leaking frame semantics into the schema layer and naturally handles the types users are most likely to filter on.