@@ -13,6 +13,7 @@ type HashCmdable interface {
13
13
HGetDel (ctx context.Context , key string , fields ... string ) * StringSliceCmd
14
14
HGetEX (ctx context.Context , key string , fields ... string ) * StringSliceCmd
15
15
HGetEXWithArgs (ctx context.Context , key string , options * HGetEXOptions , fields ... string ) * StringSliceCmd
16
+ HIncrBy (ctx context.Context , key , field string , incr int64 ) * IntCmd
16
17
HIncrByFloat (ctx context.Context , key , field string , incr float64 ) * FloatCmd
17
18
HKeys (ctx context.Context , key string ) * StringSliceCmd
18
19
HLen (ctx context.Context , key string ) * IntCmd
@@ -223,7 +224,10 @@ type HExpireArgs struct {
223
224
224
225
// HExpire - Sets the expiration time for specified fields in a hash in seconds.
225
226
// The command constructs an argument list starting with "HEXPIRE", followed by the key, duration, any conditional flags, and the specified fields.
226
- // For more information - https://redis.io/commands/hexpire/
227
+ // Available since Redis 7.4 CE.
228
+ // For more information refer to [HEXPIRE Documentation].
229
+ //
230
+ // [HEXPIRE Documentation]: https://redis.io/commands/hexpire/
227
231
func (c cmdable ) HExpire (ctx context.Context , key string , expiration time.Duration , fields ... string ) * IntSliceCmd {
228
232
args := []interface {}{"HEXPIRE" , key , formatSec (ctx , expiration ), "FIELDS" , len (fields )}
229
233
@@ -238,7 +242,10 @@ func (c cmdable) HExpire(ctx context.Context, key string, expiration time.Durati
238
242
// HExpireWithArgs - Sets the expiration time for specified fields in a hash in seconds.
239
243
// 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.
240
244
// The command constructs an argument list starting with "HEXPIRE", followed by the key, duration, any conditional flags, and the specified fields.
241
- // For more information - https://redis.io/commands/hexpire/
245
+ // Available since Redis 7.4 CE.
246
+ // For more information refer to [HEXPIRE Documentation].
247
+ //
248
+ // [HEXPIRE Documentation]: https://redis.io/commands/hexpire/
242
249
func (c cmdable ) HExpireWithArgs (ctx context.Context , key string , expiration time.Duration , expirationArgs HExpireArgs , fields ... string ) * IntSliceCmd {
243
250
args := []interface {}{"HEXPIRE" , key , formatSec (ctx , expiration )}
244
251
@@ -267,7 +274,10 @@ func (c cmdable) HExpireWithArgs(ctx context.Context, key string, expiration tim
267
274
// HPExpire - Sets the expiration time for specified fields in a hash in milliseconds.
268
275
// Similar to HExpire, it accepts a key, an expiration duration in milliseconds, a struct with expiration condition flags, and a list of fields.
269
276
// The command modifies the standard time.Duration to milliseconds for the Redis command.
270
- // For more information - https://redis.io/commands/hpexpire/
277
+ // Available since Redis 7.4 CE.
278
+ // For more information refer to [HPEXPIRE Documentation].
279
+ //
280
+ // [HPEXPIRE Documentation]: https://redis.io/commands/hpexpire/
271
281
func (c cmdable ) HPExpire (ctx context.Context , key string , expiration time.Duration , fields ... string ) * IntSliceCmd {
272
282
args := []interface {}{"HPEXPIRE" , key , formatMs (ctx , expiration ), "FIELDS" , len (fields )}
273
283
@@ -279,6 +289,13 @@ func (c cmdable) HPExpire(ctx context.Context, key string, expiration time.Durat
279
289
return cmd
280
290
}
281
291
292
+ // HPExpireWithArgs - Sets the expiration time for specified fields in a hash in milliseconds.
293
+ // 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.
294
+ // The command constructs an argument list starting with "HPEXPIRE", followed by the key, duration, any conditional flags, and the specified fields.
295
+ // Available since Redis 7.4 CE.
296
+ // For more information refer to [HPEXPIRE Documentation].
297
+ //
298
+ // [HPEXPIRE Documentation]: https://redis.io/commands/hpexpire/
282
299
func (c cmdable ) HPExpireWithArgs (ctx context.Context , key string , expiration time.Duration , expirationArgs HExpireArgs , fields ... string ) * IntSliceCmd {
283
300
args := []interface {}{"HPEXPIRE" , key , formatMs (ctx , expiration )}
284
301
@@ -307,7 +324,10 @@ func (c cmdable) HPExpireWithArgs(ctx context.Context, key string, expiration ti
307
324
// HExpireAt - Sets the expiration time for specified fields in a hash to a UNIX timestamp in seconds.
308
325
// Takes a key, a UNIX timestamp, a struct of conditional flags, and a list of fields.
309
326
// The command sets absolute expiration times based on the UNIX timestamp provided.
310
- // For more information - https://redis.io/commands/hexpireat/
327
+ // Available since Redis 7.4 CE.
328
+ // For more information refer to [HExpireAt Documentation].
329
+ //
330
+ // [HExpireAt Documentation]: https://redis.io/commands/hexpireat/
311
331
func (c cmdable ) HExpireAt (ctx context.Context , key string , tm time.Time , fields ... string ) * IntSliceCmd {
312
332
313
333
args := []interface {}{"HEXPIREAT" , key , tm .Unix (), "FIELDS" , len (fields )}
@@ -347,7 +367,10 @@ func (c cmdable) HExpireAtWithArgs(ctx context.Context, key string, tm time.Time
347
367
348
368
// HPExpireAt - Sets the expiration time for specified fields in a hash to a UNIX timestamp in milliseconds.
349
369
// Similar to HExpireAt but for timestamps in milliseconds. It accepts the same parameters and adjusts the UNIX time to milliseconds.
350
- // 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/
351
374
func (c cmdable ) HPExpireAt (ctx context.Context , key string , tm time.Time , fields ... string ) * IntSliceCmd {
352
375
args := []interface {}{"HPEXPIREAT" , key , tm .UnixNano () / int64 (time .Millisecond ), "FIELDS" , len (fields )}
353
376
@@ -387,7 +410,10 @@ func (c cmdable) HPExpireAtWithArgs(ctx context.Context, key string, tm time.Tim
387
410
// HPersist - Removes the expiration time from specified fields in a hash.
388
411
// Accepts a key and the fields themselves.
389
412
// This command ensures that each field specified will have its expiration removed if present.
390
- // 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/
391
417
func (c cmdable ) HPersist (ctx context.Context , key string , fields ... string ) * IntSliceCmd {
392
418
args := []interface {}{"HPERSIST" , key , "FIELDS" , len (fields )}
393
419
@@ -402,6 +428,10 @@ func (c cmdable) HPersist(ctx context.Context, key string, fields ...string) *In
402
428
// HExpireTime - Retrieves the expiration time for specified fields in a hash as a UNIX timestamp in seconds.
403
429
// Requires a key and the fields themselves to fetch their expiration timestamps.
404
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/
405
435
// For more information - https://redis.io/commands/hexpiretime/
406
436
func (c cmdable ) HExpireTime (ctx context.Context , key string , fields ... string ) * IntSliceCmd {
407
437
args := []interface {}{"HEXPIRETIME" , key , "FIELDS" , len (fields )}
@@ -417,6 +447,10 @@ func (c cmdable) HExpireTime(ctx context.Context, key string, fields ...string)
417
447
// HPExpireTime - Retrieves the expiration time for specified fields in a hash as a UNIX timestamp in milliseconds.
418
448
// Similar to HExpireTime, adjusted for timestamps in milliseconds. It requires the same parameters.
419
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/
420
454
// For more information - https://redis.io/commands/hexpiretime/
421
455
func (c cmdable ) HPExpireTime (ctx context.Context , key string , fields ... string ) * IntSliceCmd {
422
456
args := []interface {}{"HPEXPIRETIME" , key , "FIELDS" , len (fields )}
@@ -432,7 +466,10 @@ func (c cmdable) HPExpireTime(ctx context.Context, key string, fields ...string)
432
466
// HTTL - Retrieves the remaining time to live for specified fields in a hash in seconds.
433
467
// Requires a key and the fields themselves. It returns the TTL for each specified field.
434
468
// This command fetches the TTL in seconds for each field or returns error/status codes as appropriate.
435
- // 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/
436
473
func (c cmdable ) HTTL (ctx context.Context , key string , fields ... string ) * IntSliceCmd {
437
474
args := []interface {}{"HTTL" , key , "FIELDS" , len (fields )}
438
475
@@ -447,6 +484,10 @@ func (c cmdable) HTTL(ctx context.Context, key string, fields ...string) *IntSli
447
484
// HPTTL - Retrieves the remaining time to live for specified fields in a hash in milliseconds.
448
485
// Similar to HTTL, but returns the TTL in milliseconds. It requires a key and the specified fields.
449
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/
450
491
// For more information - https://redis.io/commands/hpttl/
451
492
func (c cmdable ) HPTTL (ctx context.Context , key string , fields ... string ) * IntSliceCmd {
452
493
args := []interface {}{"HPTTL" , key , "FIELDS" , len (fields )}
@@ -479,7 +520,7 @@ func (c cmdable) HGetEX(ctx context.Context, key string, fields ...string) *Stri
479
520
return cmd
480
521
}
481
522
482
- // ExpirationType represents an expiration option for the HGETEX command.
523
+ // HGetEXExpirationType represents an expiration option for the HGETEX command.
483
524
type HGetEXExpirationType string
484
525
485
526
const (
0 commit comments