@@ -705,8 +705,30 @@ type HashCommands interface {
705705 // [valkey.io]: https://valkey.io/commands/hstrlen/
706706 HStrLen (key string , field string ) (Result [int64 ], error )
707707
708+ // Increments the number stored at `field` in the hash stored at `key` by increment.
709+ // By using a negative increment value, the value stored at `field` in the hash stored at `key` is decremented.
710+ // If `field` or `key` does not exist, it is set to 0 before performing the operation.
711+ //
712+ // See [valkey.io] for details.
713+ //
714+ // Parameters:
715+ // key - The key of the hash.
716+ // field - The field in the hash stored at `key` to increment its value.
717+ // increment - The amount to increment.
718+ //
719+ // Return value:
720+ // The Result[int64] value of `field` in the hash stored at `key` after the increment.
721+ //
722+ // Example:
723+ // _, err := client.HSet("key", map[string]string{"field": "10"})
724+ // hincrByResult, err := client.HIncrBy("key", "field", 1)
725+ // // hincrByResult.Value(): 11
726+ //
727+ // [valkey.io]: https://valkey.io/commands/hincrby/
728+ HIncrBy (key string , field string , increment int64 ) (Result [int64 ], error )
729+
708730 // Increments the string representing a floating point number stored at `field` in the hash stored at `key` by increment.
709- // By using a negative increment value, the value stored at field in the hash stored at `key` is decremented.
731+ // By using a negative increment value, the value stored at ` field` in the hash stored at `key` is decremented.
710732 // If `field` or `key` does not exist, it is set to 0 before performing the operation.
711733 //
712734 // See [valkey.io] for details.
@@ -720,7 +742,7 @@ type HashCommands interface {
720742 // The Result[float64] value of `field` in the hash stored at `key` after the increment.
721743 //
722744 // Example:
723- // hsetResult , err := client.HSet("key", map[string]string{"field": "10"})
745+ // _ , err := client.HSet("key", map[string]string{"field": "10"})
724746 // hincrByFloatResult, err := client.HIncrByFloat("key", "field", 1.5)
725747 // // hincrByFloatResult.Value(): 11.5
726748 //
0 commit comments