Lists

Ordered sequences of strings, added and removed at either end in constant time, with blocking pops for queues and atomic moves between lists.

24 commands in KiviDB 1.1.2. Every command.

  • BLMOVE: LMOVE that waits, as BLPOP does, until source has an element or timeout seconds have passed.
  • BLMOVEM: LMOVEM that waits until source has an element, or, with EXACTLY, enough of them, or until timeout seconds have passed.
  • BLMPOP: LMPOP that waits until one of the lists has an element, or timeout seconds have passed.
  • BLPOP: Pops the first element of the first non-empty list of those given.
  • BRPOP: Like BLPOP, but pops the last element.
  • BRPOPLPUSH: RPOPLPUSH that waits until source has an element or timeout seconds have passed.
  • LINDEX: Returns the element at index in the list at key.
  • LINSERT: Inserts element before or after the first element equal to pivot, in the list at key.
  • LLEN: Returns the number of elements in the list at key.
  • LMOVE: Removes an element from one end of source and adds it to one end of destination, in one step.
  • LMOVEM: Moves several elements from one end of source to one end of destination in one step, a command of Redis 8.10.
  • LMPOP: Pops elements from the first of the given lists that is not empty.
  • LPOP: Removes and returns the first element of the list at key.
  • LPOS: Returns the index of an element equal to element in the list at key.
  • LPUSH: Adds values to the head (left) of the list at key, one after another, so the last value given ends up first.
  • LPUSHX: Adds values to the head of the list at key, only if the list exists.
  • LRANGE: Returns the elements of the list at key from index start to index stop, both included.
  • LREM: Removes elements equal to element from the list at key: - count greater than 0: the first count of them, from the head; - count less than 0: the last -count of them, from the tail; - count 0: all of…
  • LSET: Replaces the element at index in the list at key.
  • LTRIM: Keeps only the elements from index start to index stop, both included, and removes the rest.
  • RPOP: Removes and returns the last element of the list at key.
  • RPOPLPUSH: Removes the last element of source and adds it to the head of destination.
  • RPUSH: Adds values to the tail (right) of the list at key, in the order given.
  • RPUSHX: Adds values to the tail of the list at key, only if the list exists.