Repository navigation
Closed
Description
Summary
Add client-side support for the new Array data type introduced in Redis 8.8.
Arrays are sparse, indexed collections that support efficient element access, range operations, pattern matching, and aggregation. Unlike Redis Lists (which are dense, sequential structures), Arrays allow setting values at arbitrary indices and leave gaps (empty slots) between populated entries.
Server reference: redis/redis#15162
Commands
The following 18 commands are covered:
| Command | Description |
|---|---|
ARSET |
Set a value at a given index |
ARMSET |
Set multiple index-value pairs |
ARGET |
Get the value at a given index |
ARMGET |
Get values at multiple indices |
ARDEL |
Delete element(s) at given indices |
ARDELRANGE |
Delete elements in index range(s) |
ARLEN |
Get the logical length (max index + 1) |
ARCOUNT |
Get the count of populated slots |
ARGETRANGE |
Get all values in a range (nulls for empty slots) |
ARSCAN |
Scan populated entries, returning index/value pairs |
ARGREP |
Search elements by predicate (EXACT, MATCH, GLOB, RE) |
AROP |
Aggregate/count operations over a range (SUM, MIN, MAX, USED, MATCH) |
ARINSERT |
Insert values at the next available index |
ARRING |
Insert values in ring-buffer fashion |
ARNEXT |
Get the next insert index |
ARSEEK |
Set the insert cursor to a specific index |
ARLASTITEMS |
Get the last N items in insertion or reverse order |
ARINFO |
Get metadata about the array |
API
Sync / Async / Reactive / Coroutines
All commands are available across all four API flavors:
- Sync:
RedisArrayCommands<K, V> - Async:
RedisArrayAsyncCommands<K, V>(returnsRedisFuture<T>) - Reactive:
RedisArrayReactiveCommands<K, V>(returnsMono<T>/Flux<T>) - Coroutines:
RedisArrayCoroutinesCommands<K, V>(suspend functions)
Cluster support
All commands are supported over cluster connections via RedisAdvancedClusterCommands and the NodeSelection API.
Testing
- Unit tests for RESP wire format of all 18 commands
- Integration tests covering all commands across Sync, RESP2, Reactive, Cluster, and Transaction modes
Metadata
Metadata
Assignees
Labels
No labels
Activity