Add HMGET documentation, add HMGET link to readme.md (#138)

Added HMGET documentation - @thesambayo
This commit is contained in:
Samuel Adebayo
2024-10-14 02:42:13 +01:00
committed by GitHub
parent 31605a96b7
commit 87b33fa1d8
4 changed files with 50 additions and 2 deletions

View File

@@ -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)

View File

@@ -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>

View File

@@ -92,7 +92,7 @@ const config: Config = {
label: "Documentation",
},
{
href: "https://github.com//SugarDB",
href: "https://github.com/EchoVault/SugarDB",
label: "GitHub",
position: "right",
},

View File

@@ -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.