Arrays

Sparse arrays addressed by index, with an insert cursor and ring buffers: Redis 8.8's array type (AR*).

18 commands in KiviDB 1.2.2. Every command.

  • ARCOUNT: Returns the number of filled slots in the array at key.
  • ARDEL: Empties the slots at the given indexes in the array at key.
  • ARDELRANGE: Empties every slot from start to end, both included, in the array at key, for one or more ranges.
  • ARGET: Returns the value at index in the array at key.
  • ARGETRANGE: Returns every slot from start to end, both included, nil for empty ones.
  • ARGREP: Returns the indexes of the slots from start to end whose values match.
  • ARINFO: Returns the array's filled slots (count), its len, the insert cursor (next-insert-index), and how it is laid out in memory: its slices of slice-size slots, and the directories that find them.
  • ARINSERT: Writes values at the array's insert cursor, moving the cursor on one slot per value.
  • ARLASTITEMS: Returns the count slots before the insert cursor, oldest first, or newest first with REV, nil for empty ones.
  • ARLEN: Returns the highest filled index plus one; 0 for a missing key.
  • ARMGET: Returns the values at several indexes in the array at key, in one call.
  • ARMSET: Sets values at several indexes in the array at key, in one call.
  • ARNEXT: Returns the index the next ARINSERT on the array at key will write to.
  • AROP: Computes over the filled slots from start to end.
  • ARRING: Writes values into a ring buffer of size slots: the cursor wraps around at size, so newer values overwrite the oldest.
  • ARSCAN: Returns the filled slots from start to end, skipping empty ones, as [index, value] pairs; in reverse with start greater than end.
  • ARSEEK: Moves the insert cursor of the array at key to index, so the next ARINSERT writes there.
  • ARSET: Sets values in the array at key from index on, one slot each.