@@ -224,6 +224,7 @@ type HExpireArgs struct {
224
224
225
225
// HExpire - Sets the expiration time for specified fields in a hash in seconds.
226
226
// 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.
227
228
// For more information - https://redis.io/commands/hexpire/
228
229
func (c cmdable ) HExpire (ctx context.Context , key string , expiration time.Duration , fields ... string ) * IntSliceCmd {
229
230
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
239
240
// HExpireWithArgs - Sets the expiration time for specified fields in a hash in seconds.
240
241
// 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.
241
242
// 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.
242
244
// For more information - https://redis.io/commands/hexpire/
243
245
func (c cmdable ) HExpireWithArgs (ctx context.Context , key string , expiration time.Duration , expirationArgs HExpireArgs , fields ... string ) * IntSliceCmd {
244
246
args := []interface {}{"HEXPIRE" , key , formatSec (ctx , expiration )}
@@ -268,6 +270,7 @@ func (c cmdable) HExpireWithArgs(ctx context.Context, key string, expiration tim
268
270
// HPExpire - Sets the expiration time for specified fields in a hash in milliseconds.
269
271
// Similar to HExpire, it accepts a key, an expiration duration in milliseconds, a struct with expiration condition flags, and a list of fields.
270
272
// The command modifies the standard time.Duration to milliseconds for the Redis command.
273
+ // Available since Redis 7.4 CE.
271
274
// For more information - https://redis.io/commands/hpexpire/
272
275
func (c cmdable ) HPExpire (ctx context.Context , key string , expiration time.Duration , fields ... string ) * IntSliceCmd {
273
276
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
280
283
return cmd
281
284
}
282
285
286
+ // Available since Redis 7.4 CE.
283
287
func (c cmdable ) HPExpireWithArgs (ctx context.Context , key string , expiration time.Duration , expirationArgs HExpireArgs , fields ... string ) * IntSliceCmd {
284
288
args := []interface {}{"HPEXPIRE" , key , formatMs (ctx , expiration )}
285
289
@@ -308,6 +312,7 @@ func (c cmdable) HPExpireWithArgs(ctx context.Context, key string, expiration ti
308
312
// HExpireAt - Sets the expiration time for specified fields in a hash to a UNIX timestamp in seconds.
309
313
// Takes a key, a UNIX timestamp, a struct of conditional flags, and a list of fields.
310
314
// The command sets absolute expiration times based on the UNIX timestamp provided.
315
+ // Available since Redis 7.4 CE.
311
316
// For more information - https://redis.io/commands/hexpireat/
312
317
func (c cmdable ) HExpireAt (ctx context.Context , key string , tm time.Time , fields ... string ) * IntSliceCmd {
313
318
@@ -348,6 +353,7 @@ func (c cmdable) HExpireAtWithArgs(ctx context.Context, key string, tm time.Time
348
353
349
354
// HPExpireAt - Sets the expiration time for specified fields in a hash to a UNIX timestamp in milliseconds.
350
355
// 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.
351
357
// For more information - https://redis.io/commands/hpexpireat/
352
358
func (c cmdable ) HPExpireAt (ctx context.Context , key string , tm time.Time , fields ... string ) * IntSliceCmd {
353
359
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
388
394
// HPersist - Removes the expiration time from specified fields in a hash.
389
395
// Accepts a key and the fields themselves.
390
396
// This command ensures that each field specified will have its expiration removed if present.
397
+ // Available since Redis 7.4 CE.
391
398
// For more information - https://redis.io/commands/hpersist/
392
399
func (c cmdable ) HPersist (ctx context.Context , key string , fields ... string ) * IntSliceCmd {
393
400
args := []interface {}{"HPERSIST" , key , "FIELDS" , len (fields )}
@@ -403,6 +410,7 @@ func (c cmdable) HPersist(ctx context.Context, key string, fields ...string) *In
403
410
// HExpireTime - Retrieves the expiration time for specified fields in a hash as a UNIX timestamp in seconds.
404
411
// Requires a key and the fields themselves to fetch their expiration timestamps.
405
412
// 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.
406
414
// For more information - https://redis.io/commands/hexpiretime/
407
415
func (c cmdable ) HExpireTime (ctx context.Context , key string , fields ... string ) * IntSliceCmd {
408
416
args := []interface {}{"HEXPIRETIME" , key , "FIELDS" , len (fields )}
@@ -418,6 +426,7 @@ func (c cmdable) HExpireTime(ctx context.Context, key string, fields ...string)
418
426
// HPExpireTime - Retrieves the expiration time for specified fields in a hash as a UNIX timestamp in milliseconds.
419
427
// Similar to HExpireTime, adjusted for timestamps in milliseconds. It requires the same parameters.
420
428
// Provides the expiration timestamp for each field in milliseconds.
429
+ // Available since Redis 7.4 CE.
421
430
// For more information - https://redis.io/commands/hexpiretime/
422
431
func (c cmdable ) HPExpireTime (ctx context.Context , key string , fields ... string ) * IntSliceCmd {
423
432
args := []interface {}{"HPEXPIRETIME" , key , "FIELDS" , len (fields )}
@@ -433,6 +442,7 @@ func (c cmdable) HPExpireTime(ctx context.Context, key string, fields ...string)
433
442
// HTTL - Retrieves the remaining time to live for specified fields in a hash in seconds.
434
443
// Requires a key and the fields themselves. It returns the TTL for each specified field.
435
444
// This command fetches the TTL in seconds for each field or returns error/status codes as appropriate.
445
+ // Available since Redis 7.4 CE.
436
446
// For more information - https://redis.io/commands/httl/
437
447
func (c cmdable ) HTTL (ctx context.Context , key string , fields ... string ) * IntSliceCmd {
438
448
args := []interface {}{"HTTL" , key , "FIELDS" , len (fields )}
@@ -448,6 +458,7 @@ func (c cmdable) HTTL(ctx context.Context, key string, fields ...string) *IntSli
448
458
// HPTTL - Retrieves the remaining time to live for specified fields in a hash in milliseconds.
449
459
// Similar to HTTL, but returns the TTL in milliseconds. It requires a key and the specified fields.
450
460
// This command provides the TTL in milliseconds for each field or returns error/status codes as needed.
461
+ // Available since Redis 7.4 CE.
451
462
// For more information - https://redis.io/commands/hpttl/
452
463
func (c cmdable ) HPTTL (ctx context.Context , key string , fields ... string ) * IntSliceCmd {
453
464
args := []interface {}{"HPTTL" , key , "FIELDS" , len (fields )}
0 commit comments