LMOVE
Syntax
LMOVE source destination <LEFT | RIGHT> <LEFT | RIGHT>
Module
listCategories
list slow writeDescription
Move element from one list to the other specifying left/right for both lists. LEFT represents the start of a list. RIGHT represents the end of a list.
Examples
- Go (Embedded)
- CLI
Move an element from the beginning of the source list to the end of the destination list:
db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
ok, err := db.LMove("source", "destination", "LEFT", "RIGHT")
Move an element from the beginning of the source list to the end of the destination list:
> LMOVE source destination LEFT RIGHT