@@ -3,8 +3,14 @@ This extension provides Redis client functionality for DuckDB, allowing you to i
3
3
4
4
## Features
5
5
Currently supported Redis operations:
6
- - ` redis_get(key, host, port) ` : Retrieves a value from Redis for a given key
7
- - ` redis_set(key, value, host, port) ` : Sets a value in Redis for a given key
6
+ - ` redis_get(key, host, port, password) ` : Retrieves a value from Redis for a given key
7
+ - ` redis_set(key, value, host, port, password) ` : Sets a value in Redis for a given key
8
+
9
+ Features:
10
+ - Connection pooling for improved performance
11
+ - Redis authentication support
12
+ - Thread-safe operations
13
+ - Detailed error handling
8
14
9
15
## Installation
10
16
``` sql
@@ -13,6 +19,18 @@ LOAD 'redis';
13
19
```
14
20
15
21
## Usage Examples
22
+ ### Connecting with Authentication
23
+ ``` sql
24
+ -- Set a value with authentication
25
+ SELECT redis_set(' user:1' , ' John Doe' , ' localhost' , ' 6379' , ' mypassword' ) as result;
26
+
27
+ -- Get a value with authentication
28
+ SELECT redis_get(' user:1' , ' localhost' , ' 6379' , ' mypassword' ) as user_name;
29
+
30
+ -- For non-authenticated Redis servers, pass an empty string as password
31
+ SELECT redis_get(' user:1' , ' localhost' , ' 6379' , ' ' ) as user_name;
32
+ ```
33
+
16
34
### Setting Values in Redis
17
35
``` sql
18
36
-- Set a single value
0 commit comments