Skip to content

Conversation

DarthB
Copy link
Contributor

@DarthB DarthB commented Sep 15, 2025

Previous PR got auto-closed and is not re-openable: #419

This PR adds functionality needed by the LoadDocument Port in RediSearch.
See RediSearch/RediSearch#6509

The main additions:

A wrapper around the RedisModule_ScanKey.

  • ScanKeyCursor wraps a RedisModule_ScanCursor and ports RedisModule_ScanKey
  • Provides a for_each method that takes a closure
  • Add ScanKeyCursor Usage to scan_key example
  • Add Integration tests for the foreach and low-level implementation

Other additions:

  • Adds RedisString::from_raw_parts
  • Add get_raw to CallReply enum and sub types

Related PRs

  1. During the CI we run into strange integration test failures, related to side effects that are fixed in the PR: MOD-11364: Improves the robustness of integration tests #425

  2. A breaking change regarding the enum representation has been split into the PR: Breaking Change Proposal: Replace isize with i32 or u32 as representations for enums. #420

@DarthB DarthB changed the title MOD-10712 - Port RM_ScanKey #41 MOD-10712 - Port RM_ScanKey Sep 16, 2025
scan_key(
self.key.key_inner,
self.inner_cursor,
Some(scan_callback::<F>),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't make sense to have no callback, but this is dictated by API, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is related to how bindgen auto generates the function pointer types. So it's dictacted by the tool bindgen we use for code generation.

@DarthB DarthB merged commit 1ab8401 into master Oct 15, 2025
34 checks passed
@DarthB DarthB deleted the tj/wip/additions_for_rs_load_document branch October 15, 2025 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants