Skip to main content

Overview

Inserts one or more values at the tail of the list stored at key. If key does not exist, it is created as an empty list before performing the push operations.

Method Signature

Parameters

key
string
required
The key of the list.
elements
TData[]
required
One or more elements to insert at the tail of the list. Elements are inserted one after the other, so the first element in the arguments will be inserted first.

Return Value

length
number
The length of the list after the push operations.

Examples

Basic Usage

Working with Objects

Building a Log Stream

Batch Insert

See Also

  • LPUSH - Insert elements at the head of a list
  • RPOP - Remove and return the last element of a list
  • LRANGE - Get a range of elements from a list
  • LLEN - Get the length of a list