docs: Add doc comment to HGetAll describing behavior and complexity (#3776)

* docs: Add doc comment to HGetAll describing behavior and complexity

* docs: reword HGetAll comment to describe Go API return type

---------

Co-authored-by: ofekshenawa <[email protected]>
This commit is contained in:
bitcore
2026-04-15 22:33:03 +03:00
committed by GitHub
co-authored by ofekshenawa
parent 4b8d0272c3
commit ca74fb89ed
+7
View File
@@ -70,6 +70,13 @@ func (c cmdable) HGet(ctx context.Context, key, field string) *StringCmd {
return cmd
}
// HGetAll returns a map of all fields and values stored at key.
//
// Returns an empty map when key does not exist.
//
// Time complexity: O(N) where N is the size of the hash.
//
// See https://redis.io/commands/hgetall/
func (c cmdable) HGetAll(ctx context.Context, key string) *MapStringStringCmd {
cmd := NewMapStringStringCmd(ctx, "hgetall", key)
_ = c(ctx, cmd)