Skip to content

Commit

Permalink
add HMGET documentation, add HMGET link to readme.md
Browse files Browse the repository at this point in the history
and fix wrong github route in documentation header
  • Loading branch information
thesambayo committed Oct 13, 2024
1 parent ff96d45 commit db14868
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ MSET (10 keys): 56022.41 requests per second, p50=0.463 msec
* [HINCRBYFLOAT](https://sugardb.io/docs/commands/hash/hincrbyfloat)
* [HKEYS](https://sugardb.io/docs/commands/hash/hkeys)
* [HLEN](https://sugardb.io/docs/commands/hash/hlen)
* [HMGET](https://sugardb.io/docs/commands/hash/hmget)
* [HRANDFIELD](https://sugardb.io/docs/commands/hash/hrandfield)
* [HSET](https://sugardb.io/docs/commands/hash/hset)
* [HSETNX](https://sugardb.io/docs/commands/hash/hsetnx)
Expand Down
47 changes: 47 additions & 0 deletions docs/docs/commands/hash/hmget.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# HMGET

### Syntax
```
HMGET key field [field ...]
```

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

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

### Description
Retrieves the value of each of the listed fields from the hash.

### Examples

<Tabs
defaultValue="go"
values={[
{ label: 'Go (Embedded)', value: 'go', },
{ label: 'CLI', value: 'cli', },
]}
>
<TabItem value="go">
Retrieve values from a hash:
```go
db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
values, err := db.HMGet("key", "field1", "field2", "field3")
```
</TabItem>
<TabItem value="cli">
Retrieve values from a hash:
```
> HMGET key field1 field2
```
</TabItem>
</Tabs>
2 changes: 1 addition & 1 deletion docs/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const config: Config = {
label: "Documentation",
},
{
href: "https://github.com//SugarDB",
href: "https://github.com/EchoVault/SugarDB",
label: "GitHub",
position: "right",
},
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/index.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="home">
<div className="home">
<img width="200" src="img/ram.png" />
# Unleash the Power of Configurable, Distributed In-Memory Storage
SugarDB is a highly configurable, distributed, in-memory data store and cache implemented in Go. It can be imported as a Go library or run as an independent service.
Expand Down

0 comments on commit db14868

Please sign in to comment.