mirror of
https://github.com/EchoVault/SugarDB.git
synced 2025-10-06 00:16:53 +08:00
48 lines
922 B
Plaintext
48 lines
922 B
Plaintext
import Tabs from '@theme/Tabs';
|
|
import TabItem from '@theme/TabItem';
|
|
|
|
# LRANGE
|
|
|
|
### Syntax
|
|
```
|
|
LRANGE key start end
|
|
```
|
|
|
|
### Module
|
|
<span className="acl-category">list</span>
|
|
|
|
### Categories
|
|
<span className="acl-category">list</span>
|
|
<span className="acl-category">read</span>
|
|
<span className="acl-category">slow</span>
|
|
|
|
### Description
|
|
Return a range of elements between the given indices.
|
|
|
|
### Examples
|
|
|
|
<Tabs
|
|
defaultValue="go"
|
|
values={[
|
|
{ label: 'Go (Embedded)', value: 'go', },
|
|
{ label: 'CLI', value: 'cli', },
|
|
]}
|
|
>
|
|
<TabItem value="go">
|
|
Return a range of elements between the given indices:
|
|
```go
|
|
vault, err := echovault.NewEchoVault()
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
list, err := vault.LRange("key", 2, 6)
|
|
```
|
|
</TabItem>
|
|
<TabItem value="cli">
|
|
Return a range of elements between the given indices:
|
|
```
|
|
> LRANGE key 2 6
|
|
```
|
|
</TabItem>
|
|
</Tabs>
|