47 lines
808 B
Plaintext
47 lines
808 B
Plaintext
import Tabs from '@theme/Tabs';
|
|
import TabItem from '@theme/TabItem';
|
|
|
|
# COMMAND COUNT
|
|
|
|
### Syntax
|
|
```
|
|
COMMAND COUNT
|
|
```
|
|
|
|
### Module
|
|
<span className="acl-category">admin</span>
|
|
|
|
### Categories
|
|
<span className="acl-category">admin</span>
|
|
<span className="acl-category">slow</span>
|
|
|
|
### Description
|
|
Get the number of commands in the SugarDB instance.
|
|
|
|
### Examples
|
|
|
|
<Tabs
|
|
defaultValue="go"
|
|
values={[
|
|
{ label: 'Go (Embedded)', value: 'go', },
|
|
{ label: 'CLI', value: 'cli', },
|
|
]}
|
|
>
|
|
<TabItem value="go">
|
|
Get server command count:
|
|
```go
|
|
db, err := sugardb.NewSugarDB()
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
count, err := db.CommandCount()
|
|
```
|
|
</TabItem>
|
|
<TabItem value="cli">
|
|
Get server command count:
|
|
```
|
|
> COMMAND COUNT
|
|
```
|
|
</TabItem>
|
|
</Tabs>
|