@@ -224,6 +224,7 @@ type HExpireArgs struct {
224224
225225// HExpire - Sets the expiration time for specified fields in a hash in seconds.
226226// The command constructs an argument list starting with "HEXPIRE", followed by the key, duration, any conditional flags, and the specified fields.
227+ // Available since Redis 7.4 CE.
227228// For more information - https://redis.io/commands/hexpire/
228229func (c cmdable ) HExpire (ctx context.Context , key string , expiration time.Duration , fields ... string ) * IntSliceCmd {
229230 args := []interface {}{"HEXPIRE" , key , formatSec (ctx , expiration ), "FIELDS" , len (fields )}
@@ -239,6 +240,7 @@ func (c cmdable) HExpire(ctx context.Context, key string, expiration time.Durati
239240// HExpireWithArgs - Sets the expiration time for specified fields in a hash in seconds.
240241// It requires a key, an expiration duration, a struct with boolean flags for conditional expiration settings (NX, XX, GT, LT), and a list of fields.
241242// The command constructs an argument list starting with "HEXPIRE", followed by the key, duration, any conditional flags, and the specified fields.
243+ // Available since Redis 7.4 CE.
242244// For more information - https://redis.io/commands/hexpire/
243245func (c cmdable ) HExpireWithArgs (ctx context.Context , key string , expiration time.Duration , expirationArgs HExpireArgs , fields ... string ) * IntSliceCmd {
244246 args := []interface {}{"HEXPIRE" , key , formatSec (ctx , expiration )}
@@ -268,6 +270,7 @@ func (c cmdable) HExpireWithArgs(ctx context.Context, key string, expiration tim
268270// HPExpire - Sets the expiration time for specified fields in a hash in milliseconds.
269271// Similar to HExpire, it accepts a key, an expiration duration in milliseconds, a struct with expiration condition flags, and a list of fields.
270272// The command modifies the standard time.Duration to milliseconds for the Redis command.
273+ // Available since Redis 7.4 CE.
271274// For more information - https://redis.io/commands/hpexpire/
272275func (c cmdable ) HPExpire (ctx context.Context , key string , expiration time.Duration , fields ... string ) * IntSliceCmd {
273276 args := []interface {}{"HPEXPIRE" , key , formatMs (ctx , expiration ), "FIELDS" , len (fields )}
@@ -280,6 +283,7 @@ func (c cmdable) HPExpire(ctx context.Context, key string, expiration time.Durat
280283 return cmd
281284}
282285
286+ // Available since Redis 7.4 CE.
283287func (c cmdable ) HPExpireWithArgs (ctx context.Context , key string , expiration time.Duration , expirationArgs HExpireArgs , fields ... string ) * IntSliceCmd {
284288 args := []interface {}{"HPEXPIRE" , key , formatMs (ctx , expiration )}
285289
@@ -308,6 +312,7 @@ func (c cmdable) HPExpireWithArgs(ctx context.Context, key string, expiration ti
308312// HExpireAt - Sets the expiration time for specified fields in a hash to a UNIX timestamp in seconds.
309313// Takes a key, a UNIX timestamp, a struct of conditional flags, and a list of fields.
310314// The command sets absolute expiration times based on the UNIX timestamp provided.
315+ // Available since Redis 7.4 CE.
311316// For more information - https://redis.io/commands/hexpireat/
312317func (c cmdable ) HExpireAt (ctx context.Context , key string , tm time.Time , fields ... string ) * IntSliceCmd {
313318
@@ -348,6 +353,7 @@ func (c cmdable) HExpireAtWithArgs(ctx context.Context, key string, tm time.Time
348353
349354// HPExpireAt - Sets the expiration time for specified fields in a hash to a UNIX timestamp in milliseconds.
350355// Similar to HExpireAt but for timestamps in milliseconds. It accepts the same parameters and adjusts the UNIX time to milliseconds.
356+ // Available since Redis 7.4 CE.
351357// For more information - https://redis.io/commands/hpexpireat/
352358func (c cmdable ) HPExpireAt (ctx context.Context , key string , tm time.Time , fields ... string ) * IntSliceCmd {
353359 args := []interface {}{"HPEXPIREAT" , key , tm .UnixNano () / int64 (time .Millisecond ), "FIELDS" , len (fields )}
@@ -388,6 +394,7 @@ func (c cmdable) HPExpireAtWithArgs(ctx context.Context, key string, tm time.Tim
388394// HPersist - Removes the expiration time from specified fields in a hash.
389395// Accepts a key and the fields themselves.
390396// This command ensures that each field specified will have its expiration removed if present.
397+ // Available since Redis 7.4 CE.
391398// For more information - https://redis.io/commands/hpersist/
392399func (c cmdable ) HPersist (ctx context.Context , key string , fields ... string ) * IntSliceCmd {
393400 args := []interface {}{"HPERSIST" , key , "FIELDS" , len (fields )}
@@ -403,6 +410,7 @@ func (c cmdable) HPersist(ctx context.Context, key string, fields ...string) *In
403410// HExpireTime - Retrieves the expiration time for specified fields in a hash as a UNIX timestamp in seconds.
404411// Requires a key and the fields themselves to fetch their expiration timestamps.
405412// This command returns the expiration times for each field or error/status codes for each field as specified.
413+ // Available since Redis 7.4 CE.
406414// For more information - https://redis.io/commands/hexpiretime/
407415func (c cmdable ) HExpireTime (ctx context.Context , key string , fields ... string ) * IntSliceCmd {
408416 args := []interface {}{"HEXPIRETIME" , key , "FIELDS" , len (fields )}
@@ -418,6 +426,7 @@ func (c cmdable) HExpireTime(ctx context.Context, key string, fields ...string)
418426// HPExpireTime - Retrieves the expiration time for specified fields in a hash as a UNIX timestamp in milliseconds.
419427// Similar to HExpireTime, adjusted for timestamps in milliseconds. It requires the same parameters.
420428// Provides the expiration timestamp for each field in milliseconds.
429+ // Available since Redis 7.4 CE.
421430// For more information - https://redis.io/commands/hexpiretime/
422431func (c cmdable ) HPExpireTime (ctx context.Context , key string , fields ... string ) * IntSliceCmd {
423432 args := []interface {}{"HPEXPIRETIME" , key , "FIELDS" , len (fields )}
@@ -433,6 +442,7 @@ func (c cmdable) HPExpireTime(ctx context.Context, key string, fields ...string)
433442// HTTL - Retrieves the remaining time to live for specified fields in a hash in seconds.
434443// Requires a key and the fields themselves. It returns the TTL for each specified field.
435444// This command fetches the TTL in seconds for each field or returns error/status codes as appropriate.
445+ // Available since Redis 7.4 CE.
436446// For more information - https://redis.io/commands/httl/
437447func (c cmdable ) HTTL (ctx context.Context , key string , fields ... string ) * IntSliceCmd {
438448 args := []interface {}{"HTTL" , key , "FIELDS" , len (fields )}
@@ -448,6 +458,7 @@ func (c cmdable) HTTL(ctx context.Context, key string, fields ...string) *IntSli
448458// HPTTL - Retrieves the remaining time to live for specified fields in a hash in milliseconds.
449459// Similar to HTTL, but returns the TTL in milliseconds. It requires a key and the specified fields.
450460// This command provides the TTL in milliseconds for each field or returns error/status codes as needed.
461+ // Available since Redis 7.4 CE.
451462// For more information - https://redis.io/commands/hpttl/
452463func (c cmdable ) HPTTL (ctx context.Context , key string , fields ... string ) * IntSliceCmd {
453464 args := []interface {}{"HPTTL" , key , "FIELDS" , len (fields )}
0 commit comments