-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented MOVE command - @osteensco
- Loading branch information
Showing
7 changed files
with
6,428 additions
and
6,087 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import Tabs from '@theme/Tabs'; | ||
import TabItem from '@theme/TabItem'; | ||
|
||
# MOVE | ||
|
||
### Syntax | ||
``` | ||
MOVE key database | ||
``` | ||
|
||
### Module | ||
<span className="acl-category">generic</span> | ||
|
||
### Categories | ||
<span className="acl-category">fast</span> | ||
<span className="acl-category">keyspace</span> | ||
<span className="acl-category">write</span> | ||
|
||
### Description | ||
Move key from currently selected database to specified destination database. Returns 1 if successful, if | ||
key already exists in the destination database, or key does not exist in the source database, it does nothing and returns 0. | ||
|
||
### Examples | ||
|
||
<Tabs | ||
defaultValue="go" | ||
values={[ | ||
{ label: 'Go (Embedded)', value: 'go', }, | ||
{ label: 'CLI', value: 'cli', }, | ||
]} | ||
> | ||
<TabItem value="go"> | ||
Move the key to database 1: | ||
```go | ||
db, err := sugardb.NewSugarDB() | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
value, err := db.Move("key", 1) | ||
``` | ||
</TabItem> | ||
<TabItem value="cli"> | ||
Move the key to database 1: | ||
``` | ||
> MOVE key 1 | ||
``` | ||
</TabItem> | ||
</Tabs> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters