{"acl_categories":["@read","@hash","@fast"],"arguments":[{"display_text":"key","key_spec_index":0,"name":"key","type":"key"}],"arity":2,"categories":["docs","develop","stack","oss","rs","rc","oss","kubernetes","clients"],"command_flags":["readonly","fast"],"complexity":"O(1)","description":"Returns the number of fields in a hash.","duplicateOf":"head:data-ai-metadata","group":"hash","key_specs":[{"RO":true,"begin_search":{"spec":{"index":1},"type":"index"},"find_keys":{"spec":{"keystep":1,"lastkey":0,"limit":0},"type":"range"}}],"location":"body","since":"2.0.0","syntax_fmt":"HLEN key","title":"HLEN","tableOfContents":{"sections":[{"id":"examples","title":"Examples"},{"id":"redis-software-and-redis-cloud-compatibility","title":"Redis Software and Redis Cloud compatibility"},{"id":"return-information","title":"Return information"}]},"codeExamples":[]}
hlen(
key: byte[]
) → long// The number of entries (fields) contained in the hash stored at key. If the specified key does not exist, 0 is returned assuming an empty hash.hlen(
key: String
) → long// The number of entries (fields) contained in the hash stored at key. If the specified key does not exist, 0 is returned assuming an empty hash.
hlen(
key: K// the key.
) → Long// Long integer-reply number of fields in the hash, or 0 when key does not exist.
hlen(
key: K// the key.
) → RedisFuture<Long>// Long integer-reply number of fields in the hash, or 0 when key does not exist.
hlen(
key: K// the key.
) → Mono<Long>// Long integer-reply number of fields in the hash, or 0 when key does not exist.
HashLength(
key: RedisKey, // The key of the hash.flags: CommandFlags// The flags to use for this operation.
) → long// The number of fields in the hash, or 0 when key does not exist.HashLength(
key: RedisKey, // The key of the hash.flags: CommandFlags// The flags to use for this operation.
) → long// The number of fields in the hash, or 0 when key does not exist.
HashLength(
key: RedisKey, // The key of the hash.flags: CommandFlags// The flags to use for this operation.
) → long// The number of fields in the hash, or 0 when key does not exist.HashLength(
key: RedisKey, // The key of the hash.flags: CommandFlags// The flags to use for this operation.
) → long// The number of fields in the hash, or 0 when key does not exist.