feat: Add PostgreSQL and Redis client support
- Add PostgreSQL client functionality for database interactions. - Add Redis client functionality for cache and data store operations. - Extend Rhai scripting with PostgreSQL and Redis client modules. - Add documentation and test cases for both clients.
This commit is contained in:
@@ -2,6 +2,16 @@
|
||||
|
||||
This document describes the test scripts for the Redis client module in the SAL library. These tests verify the functionality of the Redis client module's connection management and Redis operations.
|
||||
|
||||
## Redis Client Features
|
||||
|
||||
The Redis client module provides the following features:
|
||||
|
||||
1. **Basic Redis Operations**: SET, GET, DEL, etc.
|
||||
2. **Hash Operations**: HSET, HGET, HGETALL, HDEL
|
||||
3. **List Operations**: RPUSH, LPUSH, LLEN, LRANGE
|
||||
4. **Connection Management**: Automatic connection handling and reconnection
|
||||
5. **Builder Pattern for Configuration**: Flexible configuration with authentication support
|
||||
|
||||
## Test Structure
|
||||
|
||||
The tests are organized into two main scripts:
|
||||
@@ -75,6 +85,24 @@ These tests require a Redis server to be running and accessible. The tests will
|
||||
|
||||
If no Redis server is available, the tests will be skipped rather than failing.
|
||||
|
||||
## Authentication Support
|
||||
|
||||
The Redis client module will support authentication using the builder pattern in a future update.
|
||||
|
||||
The backend implementation is ready, but the Rhai bindings are still in development.
|
||||
|
||||
When implemented, the builder pattern will support the following configuration options:
|
||||
|
||||
- Host: Set the Redis host
|
||||
- Port: Set the Redis port
|
||||
- Database: Set the Redis database number
|
||||
- Username: Set the Redis username (Redis 6.0+)
|
||||
- Password: Set the Redis password
|
||||
- TLS: Enable/disable TLS
|
||||
- Unix socket: Enable/disable Unix socket
|
||||
- Socket path: Set the Unix socket path
|
||||
- Connection timeout: Set the connection timeout in seconds
|
||||
|
||||
## Adding New Tests
|
||||
|
||||
To add a new test:
|
||||
|
Reference in New Issue
Block a user