Get the field or value at iterator cursor, for an iterator on a hash value * encoded as a hash table. Prototype is similar to * `hashTypeGetFromHashTable`. */
| 407 | * encoded as a hash table. Prototype is similar to |
| 408 | * `hashTypeGetFromHashTable`. */ |
| 409 | sds hashTypeCurrentFromHashTable(hashTypeIterator *hi, int what) { |
| 410 | serverAssert(hi->encoding == OBJ_ENCODING_HT); |
| 411 | |
| 412 | if (what & OBJ_HASH_KEY) { |
| 413 | return (sds)dictGetKey(hi->de); |
| 414 | } else { |
| 415 | return (sds)dictGetVal(hi->de); |
| 416 | } |
| 417 | } |
| 418 | |
| 419 | /* Higher level function of hashTypeCurrent*() that returns the hash value |
| 420 | * at current iterator position. |
no outgoing calls
no test coverage detected