feat: add missing HFE (Hash Field Expiration) command types to RedisCommander#61
Open
kkonaparthi1 wants to merge 1 commit into
Open
feat: add missing HFE (Hash Field Expiration) command types to RedisCommander#61kkonaparthi1 wants to merge 1 commit into
kkonaparthi1 wants to merge 1 commit into
Conversation
…ommander Add type definitions for Valkey 8+ hash field expiration commands that are missing from the RedisCommander interface: - hexpire: Set expiration in seconds for hash fields - hpexpire: Set expiration in milliseconds for hash fields - hexpireat: Set expiration as Unix timestamp (seconds) for hash fields - hpexpireat: Set expiration as Unix timestamp (milliseconds) for hash fields - httl: Get remaining TTL in seconds for hash fields - hpttl: Get remaining TTL in milliseconds for hash fields - hpersist: Remove expiration from hash fields - hexpiretime: Get expiration as Unix timestamp (seconds) for hash fields - hpexpiretime: Get expiration as Unix timestamp (milliseconds) for hash fields These commands exist on the Valkey class at runtime but were missing from the TypeScript interface, preventing pipeline usage and type checking for TypeScript users. Fixes valkey-io#57 Signed-off-by: Karthik Konaparthi <konapk@amazon.com>
ad55c37 to
d5df8ca
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.
Fixes #57
Summary
Add type definitions for Valkey 8+ hash field expiration (HFE) commands that are missing from the
RedisCommanderinterface.Commands Added
hexpire— Set expiration in seconds for hash fieldshpexpire— Set expiration in milliseconds for hash fieldshexpireat— Set expiration as Unix timestamp (seconds)hpexpireat— Set expiration as Unix timestamp (milliseconds)httl— Get remaining TTL in seconds for hash fieldshpttl— Get remaining TTL in milliseconds for hash fieldshpersist— Remove expiration from hash fieldshexpiretime— Get expiration as Unix timestamp (seconds)hpexpiretime— Get expiration as Unix timestamp (milliseconds)Problem
These commands exist on the Valkey class at runtime but are missing from the
RedisCommanderTypeScript interface. This prevents TypeScript users from calling them through pipelines and getting type checking.Approach
Added method signatures following the existing patterns in
RedisCommander.tsfor similar commands (expire,pexpire, etc.). Includes all NX/XX/GT/LT condition variants for the expiration-setting commands.