|
| 1 | +```mermaid |
| 2 | +graph LR |
| 3 | + Command_Interface["Command Interface"] |
| 4 | + Basic_Key_Commands["Basic Key Commands"] |
| 5 | + Hash_Commands["Hash Commands"] |
| 6 | + List_Commands["List Commands"] |
| 7 | + Set_Commands["Set Commands"] |
| 8 | + Sorted_Set_Commands["Sorted Set Commands"] |
| 9 | + Stream_Commands["Stream Commands"] |
| 10 | + PubSub_Commands["PubSub Commands"] |
| 11 | + Script_Commands["Script Commands"] |
| 12 | + Basic_Key_Commands -- "Implements" --> Command_Interface |
| 13 | + Hash_Commands -- "Implements" --> Command_Interface |
| 14 | + List_Commands -- "Implements" --> Command_Interface |
| 15 | + Set_Commands -- "Implements" --> Command_Interface |
| 16 | + Sorted_Set_Commands -- "Implements" --> Command_Interface |
| 17 | + Stream_Commands -- "Implements" --> Command_Interface |
| 18 | + PubSub_Commands -- "Implements" --> Command_Interface |
| 19 | + Script_Commands -- "Implements" --> Command_Interface |
| 20 | + List_Commands -- "Uses" --> Basic_Key_Commands |
| 21 | + Set_Commands -- "Uses" --> Basic_Key_Commands |
| 22 | + Stream_Commands -- "Uses" --> Basic_Key_Commands |
| 23 | + Sorted_Set_Commands -- "Uses" --> Basic_Key_Commands |
| 24 | + Hash_Commands -- "Uses" --> Basic_Key_Commands |
| 25 | +``` |
| 26 | +[](https://github.com/CodeBoarding/GeneratedOnBoardings)[](https://www.codeboarding.org/demo)[](mailto:[email protected]) |
| 27 | + |
| 28 | +## Component Details |
| 29 | + |
| 30 | +The Command Abstraction component provides a unified interface for interacting with Redis, abstracting away the complexities of command encoding, decoding, and execution. It encompasses various command categories, including keys, hashes, lists, sets, sorted sets, streams, pubsub, scripts, geo, modules, and functions, offering both synchronous and asynchronous execution modes. This abstraction ensures a consistent API for developers, regardless of the underlying Redis connection type, and simplifies the process of interacting with the Redis server. |
| 31 | + |
| 32 | +### Command Interface |
| 33 | +Defines the base interface for all Redis commands, providing a consistent way to execute commands and handle responses. It serves as a blueprint for concrete command implementations. |
| 34 | +- **Related Classes/Methods**: `redis.commands.core.CommandsInterface` (20:100) |
| 35 | + |
| 36 | +### Basic Key Commands |
| 37 | +Implements basic key-related commands such as GET, SET, EXISTS, and DELETE. It interacts with the Redis client to execute these commands and provides methods for encoding and decoding key values. |
| 38 | +- **Related Classes/Methods**: `redis.commands.core.BasicKeyCommands` (1557:2510) |
| 39 | + |
| 40 | +### Hash Commands |
| 41 | +Implements commands for interacting with Redis hashes, including setting, getting, and deleting fields. It interacts with the Redis client to execute these commands and provides methods for encoding and decoding hash field values. |
| 42 | +- **Related Classes/Methods**: `redis.commands.core.HashCommands` (4921:5598) |
| 43 | + |
| 44 | +### List Commands |
| 45 | +Implements commands for interacting with Redis lists, including pushing, popping, and trimming elements. It interacts with the Redis client to execute these commands and provides methods for encoding and decoding list element values. |
| 46 | +- **Related Classes/Methods**: `redis.commands.core.ListCommands` (2533:2947) |
| 47 | + |
| 48 | +### Set Commands |
| 49 | +Implements commands for interacting with Redis sets, including adding, removing, and checking membership of elements. It interacts with the Redis client to execute these commands and provides methods for encoding and decoding set element values. |
| 50 | +- **Related Classes/Methods**: `redis.commands.core.SetCommands` (3287:3462) |
| 51 | + |
| 52 | +### Sorted Set Commands |
| 53 | +Implements commands for interacting with Redis sorted sets, including adding, removing, and retrieving elements with scores. It interacts with the Redis client to execute these commands and provides methods for encoding and decoding sorted set element values. |
| 54 | +- **Related Classes/Methods**: `redis.commands.core.SortedSetCommands` (4077:4870) |
| 55 | + |
| 56 | +### Stream Commands |
| 57 | +Implements commands for interacting with Redis streams, including adding messages, reading messages, and creating consumer groups. It interacts with the Redis client to execute these commands and provides methods for encoding and decoding stream message values. |
| 58 | +- **Related Classes/Methods**: `redis.commands.core.StreamCommands` (3468:4071) |
| 59 | + |
| 60 | +### PubSub Commands |
| 61 | +Implements commands for interacting with Redis's Pub/Sub functionality, including publishing messages and subscribing to channels. It interacts with the Redis client to execute these commands and provides methods for encoding and decoding pubsub messages. |
| 62 | +- **Related Classes/Methods**: `redis.commands.core.PubSubCommands` (5720:5784) |
| 63 | + |
| 64 | +### Script Commands |
| 65 | +Enables the execution of Lua scripts on the Redis server. It includes functionalities for evaluating, loading, and managing scripts, providing a way to extend Redis's capabilities with custom logic. |
| 66 | +- **Related Classes/Methods**: `redis.commands.core.ScriptCommands` (5790:5928) |
0 commit comments