MOVE
Syntax
MOVE key database
Module
genericCategories
fast keyspace writeDescription
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
- Go (Embedded)
- CLI
Move the key to database 1:
db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
value, err := db.Move("key", 1)
Move the key to database 1:
> MOVE key 1