@@ -225,7 +225,10 @@ type HExpireArgs struct {
225
225
226
226
// HExpire - Sets the expiration time for specified fields in a hash in seconds.
227
227
// The command constructs an argument list starting with "HEXPIRE", followed by the key, duration, any conditional flags, and the specified fields.
228
- // For more information - https://redis.io/commands/hexpire/
228
+ // Available since Redis 7.4 CE.
229
+ // For more information refer to [HEXPIRE Documentation].
230
+ //
231
+ // [HEXPIRE Documentation]: https://redis.io/commands/hexpire/
229
232
func (c cmdable ) HExpire (ctx context.Context , key string , expiration time.Duration , fields ... string ) * IntSliceCmd {
230
233
args := []interface {}{"HEXPIRE" , key , formatSec (ctx , expiration ), "FIELDS" , len (fields )}
231
234
@@ -240,7 +243,10 @@ func (c cmdable) HExpire(ctx context.Context, key string, expiration time.Durati
240
243
// HExpireWithArgs - Sets the expiration time for specified fields in a hash in seconds.
241
244
// 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.
242
245
// The command constructs an argument list starting with "HEXPIRE", followed by the key, duration, any conditional flags, and the specified fields.
243
- // For more information - https://redis.io/commands/hexpire/
246
+ // Available since Redis 7.4 CE.
247
+ // For more information refer to [HEXPIRE Documentation].
248
+ //
249
+ // [HEXPIRE Documentation]: https://redis.io/commands/hexpire/
244
250
func (c cmdable ) HExpireWithArgs (ctx context.Context , key string , expiration time.Duration , expirationArgs HExpireArgs , fields ... string ) * IntSliceCmd {
245
251
args := []interface {}{"HEXPIRE" , key , formatSec (ctx , expiration )}
246
252
@@ -269,7 +275,10 @@ func (c cmdable) HExpireWithArgs(ctx context.Context, key string, expiration tim
269
275
// HPExpire - Sets the expiration time for specified fields in a hash in milliseconds.
270
276
// Similar to HExpire, it accepts a key, an expiration duration in milliseconds, a struct with expiration condition flags, and a list of fields.
271
277
// The command modifies the standard time.Duration to milliseconds for the Redis command.
272
- // For more information - https://redis.io/commands/hpexpire/
278
+ // Available since Redis 7.4 CE.
279
+ // For more information refer to [HPEXPIRE Documentation].
280
+ //
281
+ // [HPEXPIRE Documentation]: https://redis.io/commands/hpexpire/
273
282
func (c cmdable ) HPExpire (ctx context.Context , key string , expiration time.Duration , fields ... string ) * IntSliceCmd {
274
283
args := []interface {}{"HPEXPIRE" , key , formatMs (ctx , expiration ), "FIELDS" , len (fields )}
275
284
@@ -281,6 +290,13 @@ func (c cmdable) HPExpire(ctx context.Context, key string, expiration time.Durat
281
290
return cmd
282
291
}
283
292
293
+ // HPExpireWithArgs - Sets the expiration time for specified fields in a hash in milliseconds.
294
+ // 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.
295
+ // The command constructs an argument list starting with "HPEXPIRE", followed by the key, duration, any conditional flags, and the specified fields.
296
+ // Available since Redis 7.4 CE.
297
+ // For more information refer to [HPEXPIRE Documentation].
298
+ //
299
+ // [HPEXPIRE Documentation]: https://redis.io/commands/hpexpire/
284
300
func (c cmdable ) HPExpireWithArgs (ctx context.Context , key string , expiration time.Duration , expirationArgs HExpireArgs , fields ... string ) * IntSliceCmd {
285
301
args := []interface {}{"HPEXPIRE" , key , formatMs (ctx , expiration )}
286
302
@@ -309,7 +325,10 @@ func (c cmdable) HPExpireWithArgs(ctx context.Context, key string, expiration ti
309
325
// HExpireAt - Sets the expiration time for specified fields in a hash to a UNIX timestamp in seconds.
310
326
// Takes a key, a UNIX timestamp, a struct of conditional flags, and a list of fields.
311
327
// The command sets absolute expiration times based on the UNIX timestamp provided.
312
- // For more information - https://redis.io/commands/hexpireat/
328
+ // Available since Redis 7.4 CE.
329
+ // For more information refer to [HExpireAt Documentation].
330
+ //
331
+ // [HExpireAt Documentation]: https://redis.io/commands/hexpireat/
313
332
func (c cmdable ) HExpireAt (ctx context.Context , key string , tm time.Time , fields ... string ) * IntSliceCmd {
314
333
args := []interface {}{"HEXPIREAT" , key , tm .Unix (), "FIELDS" , len (fields )}
315
334
@@ -348,7 +367,10 @@ func (c cmdable) HExpireAtWithArgs(ctx context.Context, key string, tm time.Time
348
367
349
368
// HPExpireAt - Sets the expiration time for specified fields in a hash to a UNIX timestamp in milliseconds.
350
369
// Similar to HExpireAt but for timestamps in milliseconds. It accepts the same parameters and adjusts the UNIX time to milliseconds.
351
- // For more information - https://redis.io/commands/hpexpireat/
370
+ // Available since Redis 7.4 CE.
371
+ // For more information refer to [HExpireAt Documentation].
372
+ //
373
+ // [HExpireAt Documentation]: https://redis.io/commands/hexpireat/
352
374
func (c cmdable ) HPExpireAt (ctx context.Context , key string , tm time.Time , fields ... string ) * IntSliceCmd {
353
375
args := []interface {}{"HPEXPIREAT" , key , tm .UnixNano () / int64 (time .Millisecond ), "FIELDS" , len (fields )}
354
376
@@ -388,7 +410,10 @@ func (c cmdable) HPExpireAtWithArgs(ctx context.Context, key string, tm time.Tim
388
410
// HPersist - Removes the expiration time from specified fields in a hash.
389
411
// Accepts a key and the fields themselves.
390
412
// This command ensures that each field specified will have its expiration removed if present.
391
- // For more information - https://redis.io/commands/hpersist/
413
+ // Available since Redis 7.4 CE.
414
+ // For more information refer to [HPersist Documentation].
415
+ //
416
+ // [HPersist Documentation]: https://redis.io/commands/hpersist/
392
417
func (c cmdable ) HPersist (ctx context.Context , key string , fields ... string ) * IntSliceCmd {
393
418
args := []interface {}{"HPERSIST" , key , "FIELDS" , len (fields )}
394
419
@@ -403,6 +428,10 @@ func (c cmdable) HPersist(ctx context.Context, key string, fields ...string) *In
403
428
// HExpireTime - Retrieves the expiration time for specified fields in a hash as a UNIX timestamp in seconds.
404
429
// Requires a key and the fields themselves to fetch their expiration timestamps.
405
430
// This command returns the expiration times for each field or error/status codes for each field as specified.
431
+ // Available since Redis 7.4 CE.
432
+ // For more information refer to [HExpireTime Documentation].
433
+ //
434
+ // [HExpireTime Documentation]: https://redis.io/commands/hexpiretime/
406
435
// For more information - https://redis.io/commands/hexpiretime/
407
436
func (c cmdable ) HExpireTime (ctx context.Context , key string , fields ... string ) * IntSliceCmd {
408
437
args := []interface {}{"HEXPIRETIME" , key , "FIELDS" , len (fields )}
@@ -418,6 +447,10 @@ func (c cmdable) HExpireTime(ctx context.Context, key string, fields ...string)
418
447
// HPExpireTime - Retrieves the expiration time for specified fields in a hash as a UNIX timestamp in milliseconds.
419
448
// Similar to HExpireTime, adjusted for timestamps in milliseconds. It requires the same parameters.
420
449
// Provides the expiration timestamp for each field in milliseconds.
450
+ // Available since Redis 7.4 CE.
451
+ // For more information refer to [HExpireTime Documentation].
452
+ //
453
+ // [HExpireTime Documentation]: https://redis.io/commands/hexpiretime/
421
454
// For more information - https://redis.io/commands/hexpiretime/
422
455
func (c cmdable ) HPExpireTime (ctx context.Context , key string , fields ... string ) * IntSliceCmd {
423
456
args := []interface {}{"HPEXPIRETIME" , key , "FIELDS" , len (fields )}
@@ -433,7 +466,10 @@ func (c cmdable) HPExpireTime(ctx context.Context, key string, fields ...string)
433
466
// HTTL - Retrieves the remaining time to live for specified fields in a hash in seconds.
434
467
// Requires a key and the fields themselves. It returns the TTL for each specified field.
435
468
// This command fetches the TTL in seconds for each field or returns error/status codes as appropriate.
436
- // For more information - https://redis.io/commands/httl/
469
+ // Available since Redis 7.4 CE.
470
+ // For more information refer to [HTTL Documentation].
471
+ //
472
+ // [HTTL Documentation]: https://redis.io/commands/httl/
437
473
func (c cmdable ) HTTL (ctx context.Context , key string , fields ... string ) * IntSliceCmd {
438
474
args := []interface {}{"HTTL" , key , "FIELDS" , len (fields )}
439
475
@@ -448,6 +484,10 @@ func (c cmdable) HTTL(ctx context.Context, key string, fields ...string) *IntSli
448
484
// HPTTL - Retrieves the remaining time to live for specified fields in a hash in milliseconds.
449
485
// Similar to HTTL, but returns the TTL in milliseconds. It requires a key and the specified fields.
450
486
// This command provides the TTL in milliseconds for each field or returns error/status codes as needed.
487
+ // Available since Redis 7.4 CE.
488
+ // For more information refer to [HPTTL Documentation].
489
+ //
490
+ // [HPTTL Documentation]: https://redis.io/commands/hpttl/
451
491
// For more information - https://redis.io/commands/hpttl/
452
492
func (c cmdable ) HPTTL (ctx context.Context , key string , fields ... string ) * IntSliceCmd {
453
493
args := []interface {}{"HPTTL" , key , "FIELDS" , len (fields )}
0 commit comments