update docs
This commit is contained in:
+25
-2
@@ -5,10 +5,33 @@
|
||||
(Project.config "docs-logo" "")
|
||||
(Project.config "docs-url" "https://git.veitheller.de/carpentry/redis")
|
||||
(Project.config "docs-styling" "../style.css")
|
||||
(Project.config "docs-prelude" "is a Redis client library for Carp.
|
||||
(Project.config "docs-prelude" "is a Redis client library for Carp, supporting Redis 7.x.
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
(load \"https://git.veitheller.de/carpentry/redis.git@master\")
|
||||
(load \"https://git.veitheller.de/carpentry/redis.git@0.1.0\")
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```
|
||||
(defn main []
|
||||
(match (Redis.open \"127.0.0.1\")
|
||||
(Result.Success r)
|
||||
(do
|
||||
(println* &(Redis.set &r @\"key\" @\"value\"))
|
||||
(println* &(Redis.get &r @\"key\"))
|
||||
(println* &(Redis.lrange &r @\"mylist\" @\"0\" @\"-1\"))
|
||||
(match (Redis.get &r @\"key\")
|
||||
(Result.Success resp)
|
||||
(match resp
|
||||
(RESP.Str s) (println* \"got: \" &s)
|
||||
(RESP.Null) (println* \"not found\")
|
||||
_ (println* \"unexpected type\"))
|
||||
(Result.Error e) (println* \"error: \" &e))
|
||||
(Redis.close r))
|
||||
(Result.Error err) (IO.errorln &err)))
|
||||
```
|
||||
")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user