feat: Add command metadata and update tests #78
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.
Add
#[valkey_command]Metadata & KeySpecs for Bloom Filter CommandsThis PR adds the
#[valkey_command]macro to all Bloom Filter commands insrc/lib.rs, enabling properSetCommandInfosupport through thevalkeymodule-rscrate.The macro now provides Valkey with complete metadata, including:
As a result,
COMMAND INFO BF.*now correctly reports the KeySpec metadata for each Bloom Filter command.Changes Included
Added
#[valkey_command]to all Bloom Filter commands:BF.ADDBF.MADDBF.EXISTSBF.MEXISTSBF.CARDBF.RESERVEBF.INFOBF.INSERTBF.LOADImplemented complete KeySpecs for each command:
begin_searchfind_keysrw,insert,update,access)Updated tests in
tests/test_bloom_command.py:Minor cleanup:
src/bloom/data_type.rssrc/bloom/utils.rsNotes / Limitations
The current version of
valkeymodule-rsdoes not support argument metadata (args:) inSetCommandInfo.Because of this limitation, this PR implements all supported metadata (KeySpecs), but cannot yet add full CLI argument autocomplete like the built-in
SETcommand.Once
argssupport is added upstream invalkeymodule-rs, I can follow up with another PR to provide complete argument specifications for full autocomplete.Verification
Example output of
COMMAND INFO BF.ADD, showing that KeySpec metadata is now present: