Liking cljdoc? Tell your friends :D

red claw

"... Red Claw managed to pull Batman's Cowl from his face"

<! release <! clojars>

redis clojure client based on redisson.

spilling the beans

$ make repl

=> (require '[redclaw.core :as rc])
=> (def redis (rc/connect))  ;; by default will connect to a locally running redis on 6379 port
#'user/redis

=> (def s (rc/rset redis "solar-system"))
#'user/s

=> (rc/add-all s #{:mercury :venus :earth :mars :jupiter :saturn :uranus :neptune :pluto})
true
=> (count s)
9
=> (type s)
org.redisson.RedissonSet

=> (rc/read-all s)
#{:earth :mars :venus :jupiter :uranus :neptune :mercury :pluto :saturn}

looking inside the source (redis server):

redis 127.0.0.1:6379> smembers "solar-system"
1) "\x04>\x05earth"
2) "\x04>\x05pluto"
3) "\x04>\ajupiter"
4) "\x04>\x06saturn"
5) "\x04>\x06uranus"
6) "\x04>\aneptune"
7) "\x04>\amercury"
8) "\x04>\x04mars"
9) "\x04>\x05venus"

license

Copyright © 2021 tolitius

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close