import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# HKEYS

### Syntax
```
HKEYS key
```

### Module
<span className="acl-category">hash</span>

### Categories 
<span className="acl-category">hash</span>
<span className="acl-category">read</span>
<span className="acl-category">slow</span>

### Description 
Returns all the fields in a hash.

### Examples

<Tabs
  defaultValue="go"
  values={[
    { label: 'Go (Embedded)', value: 'go', },
    { label: 'CLI', value: 'cli', },
  ]}
>
  <TabItem value="go">
    Retrieve all fields from a hash:
    ```go
    db, err := sugardb.NewSugarDB()
    if err != nil {
      log.Fatal(err)
    }
    keys, err := db.HKeys("key")
    ```
  </TabItem>
  <TabItem value="cli">
    Retrieve all fields from a hash:
    ```
    > HKEYS key
    ```
  </TabItem>
</Tabs>
