LINSERT
Note
Official reference: LINSERT.
Insert before or after the first matching pivot.
Syntax
LINSERT key BEFORE|AFTER pivot element
Results
| Return | Rows | Content |
|---|---|---|
| Update count | -- | Length of the list after insert; returns 0 when key doesn't exist; returns -1 when pivot not found. |
Example
RPUSH demo:queue first second
LINSERT demo:queue AFTER first middle