RPUSHX
Syntax
RPUSHX key element [element ...]
Module
listCategories
fast list writeDescription
Appends a value to the end of a list only if the list exists.
Examples
- Go (Embedded)
- CLI
Appends a value to the end of a list only if the list exists:
db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
length, err := db.RPushX("key", "element1", "element2")
Appends a value to the end of a list only if the list exists:
> RPUSHX key element1 element2