diff --git a/docs/RESP.html b/docs/RESP.html new file mode 100644 index 0000000..9c1f215 --- /dev/null +++ b/docs/RESP.html @@ -0,0 +1,248 @@ + + + + + + + + + +
+ +

+ RESP +

+
+

is a wrapper around the Redis Serialization +Protocol. You can create all types—though +creating arrays is a little unsightly due to the absence of recursive types—, +stringify the built types into strings using str, and decoding from +the string protocol using from-string.

+

If you want your types to be supported when encoding, you’ll have to implement +the interface to-redis, the signature of which is (Fn [a] RESP)).

+ +
+
+ +

+ Arr +

+
+
+ instantiate +
+

+ (λ [(Array String)] RESP) +

+ + + +

+

creates a Arr.

+ +

+
+
+ +

+ Err +

+
+
+ instantiate +
+

+ (λ [String] RESP) +

+ + + +

+

creates a Err.

+ +

+
+
+ +

+ Integer +

+
+
+ instantiate +
+

+ (λ [Int] RESP) +

+ + + +

+

creates a Integer.

+ +

+
+
+ +

+ Null +

+
+
+ instantiate +
+

+ (λ [] RESP) +

+ + + +

+

creates a Null.

+ +

+
+
+ +

+ Str +

+
+
+ instantiate +
+

+ (λ [String] RESP) +

+ + + +

+

creates a Str.

+ +

+
+
+ +

+ copy +

+
+
+ instantiate +
+

+ (λ [(Ref RESP a)] RESP) +

+ + + +

+

copies a RESP.

+ +

+
+
+ +

+ from-string +

+
+
+ defn +
+

+ (λ [(Ref String a)] (Result RESP String)) +

+
+                    (from-string s)
+                
+

+

converts a RESP string into a RESP data structure.

+ +

+
+
+ +

+ get-tag +

+
+
+ instantiate +
+

+ (λ [(Ref RESP a)] Int) +

+ + + +

+

Gets the tag from a RESP.

+ +

+
+
+ +

+ prn +

+
+
+ instantiate +
+

+ (λ [(Ref RESP a)] String) +

+ + + +

+

converts a RESP to a string.

+ +

+
+
+ +

+ str +

+
+
+ defn +
+

+ (λ [(Ref RESP a)] String) +

+
+                    (str r)
+                
+

+

converts a RESP to a string.

+ +

+
+
+ + diff --git a/docs/Redis.html b/docs/Redis.html new file mode 100644 index 0000000..71754de --- /dev/null +++ b/docs/Redis.html @@ -0,0 +1,5368 @@ + + + + + + + + + +
+ +

+ Redis +

+
+

is a wrapper around Redis connections. It supports opening a +connection using open or open-on, reading from and +sending to the connection (using read and send, +respectively), and contains thin wrappers around all Redis commands (everything +else).

+ +
+
+ +

+ append +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (append r key value)
+                
+

+

is a wrapper around the append Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ auth +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (auth r password)
+                
+

+

is a wrapper around the auth Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ bgrewriteaof +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (bgrewriteaof r)
+                
+

+

is a wrapper around the bgrewriteaof Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ bgsave +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (bgsave r)
+                
+

+

is a wrapper around the bgsave Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ bitcount +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (bitcount r key)
+                
+

+

is a wrapper around the bitcount Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ bitfield +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (bitfield r key)
+                
+

+

is a wrapper around the bitfield Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ bitop +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (bitop r operation destkey key)
+                
+

+

is a wrapper around the bitop Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ bitpos +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (bitpos r key bit)
+                
+

+

is a wrapper around the bitpos Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ blpop +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (blpop r key timeout)
+                
+

+

is a wrapper around the blpop Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ brpop +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (brpop r key timeout)
+                
+

+

is a wrapper around the brpop Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ brpoplpush +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (brpoplpush r source destination timeout)
+                
+

+

is a wrapper around the brpoplpush Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ bzpopmax +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (bzpopmax r key timeout)
+                
+

+

is a wrapper around the bzpopmax Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ bzpopmin +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (bzpopmin r key timeout)
+                
+

+

is a wrapper around the bzpopmin Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ client-getname +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (client-getname r)
+                
+

+

is a wrapper around the client getname Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ client-id +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (client-id r)
+                
+

+

is a wrapper around the client id Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ client-kill +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (client-kill r)
+                
+

+

is a wrapper around the client kill Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ client-list +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (client-list r)
+                
+

+

is a wrapper around the client list Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ client-pause +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (client-pause r timeout)
+                
+

+

is a wrapper around the client pause Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ client-reply +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (client-reply r)
+                
+

+

is a wrapper around the client reply Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ client-setname +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (client-setname r connection-name)
+                
+

+

is a wrapper around the client setname Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ client-unblock +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (client-unblock r client-id)
+                
+

+

is a wrapper around the client unblock Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ close +

+
+
+ defn +
+

+ (λ [Redis] ()) +

+
+                    (close r)
+                
+

+

closes the connection to Redis.

+ +

+
+
+ +

+ cluster-addslots +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (cluster-addslots r slot)
+                
+

+

is a wrapper around the cluster addslots Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ cluster-bumpepoch +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (cluster-bumpepoch r)
+                
+

+

is a wrapper around the cluster bumpepoch Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ cluster-count-failure-reports +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (cluster-count-failure-reports r node-id)
+                
+

+

is a wrapper around the cluster count failure reports Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ cluster-countkeysinslot +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (cluster-countkeysinslot r slot)
+                
+

+

is a wrapper around the cluster countkeysinslot Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ cluster-delslots +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (cluster-delslots r slot)
+                
+

+

is a wrapper around the cluster delslots Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ cluster-failover +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (cluster-failover r)
+                
+

+

is a wrapper around the cluster failover Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ cluster-flushslots +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (cluster-flushslots r)
+                
+

+

is a wrapper around the cluster flushslots Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ cluster-forget +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (cluster-forget r node-id)
+                
+

+

is a wrapper around the cluster forget Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ cluster-getkeysinslot +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (cluster-getkeysinslot r slot count)
+                
+

+

is a wrapper around the cluster getkeysinslot Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ cluster-info +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (cluster-info r)
+                
+

+

is a wrapper around the cluster info Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ cluster-keyslot +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (cluster-keyslot r key)
+                
+

+

is a wrapper around the cluster keyslot Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ cluster-meet +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (cluster-meet r ip port)
+                
+

+

is a wrapper around the cluster meet Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ cluster-myid +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (cluster-myid r)
+                
+

+

is a wrapper around the cluster myid Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ cluster-nodes +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (cluster-nodes r)
+                
+

+

is a wrapper around the cluster nodes Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ cluster-replicas +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (cluster-replicas r node-id)
+                
+

+

is a wrapper around the cluster replicas Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ cluster-replicate +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (cluster-replicate r node-id)
+                
+

+

is a wrapper around the cluster replicate Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ cluster-reset +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (cluster-reset r)
+                
+

+

is a wrapper around the cluster reset Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ cluster-saveconfig +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (cluster-saveconfig r)
+                
+

+

is a wrapper around the cluster saveconfig Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ cluster-set-config-epoch +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (cluster-set-config-epoch r config-epoch)
+                
+

+

is a wrapper around the cluster set config epoch Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ cluster-setslot +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (cluster-setslot r slot)
+                
+

+

is a wrapper around the cluster setslot Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ cluster-slaves +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (cluster-slaves r node-id)
+                
+

+

is a wrapper around the cluster slaves Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ cluster-slots +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (cluster-slots r)
+                
+

+

is a wrapper around the cluster slots Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ command +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (command r)
+                
+

+

is a wrapper around the command Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ command-count +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (command-count r)
+                
+

+

is a wrapper around the command count Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ command-getkeys +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (command-getkeys r)
+                
+

+

is a wrapper around the command getkeys Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ command-info +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (command-info r command-name)
+                
+

+

is a wrapper around the command info Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ config-get +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (config-get r parameter)
+                
+

+

is a wrapper around the config get Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ config-resetstat +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (config-resetstat r)
+                
+

+

is a wrapper around the config resetstat Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ config-rewrite +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (config-rewrite r)
+                
+

+

is a wrapper around the config rewrite Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ config-set +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (config-set r parameter value)
+                
+

+

is a wrapper around the config set Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ copy +

+
+
+ instantiate +
+

+ (λ [(Ref Redis a)] Redis) +

+ + + +

+

copies a Redis.

+ +

+
+
+ +

+ dbsize +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (dbsize r)
+                
+

+

is a wrapper around the dbsize Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ debug-object +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (debug-object r key)
+                
+

+

is a wrapper around the debug object Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ debug-segfault +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (debug-segfault r)
+                
+

+

is a wrapper around the debug segfault Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ decr +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (decr r key)
+                
+

+

is a wrapper around the decr Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ decrby +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (decrby r key decrement)
+                
+

+

is a wrapper around the decrby Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ del +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (del r key)
+                
+

+

is a wrapper around the del Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ discard +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (discard r)
+                
+

+

is a wrapper around the discard Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ dump +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (dump r key)
+                
+

+

is a wrapper around the dump Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ echo +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (echo r message)
+                
+

+

is a wrapper around the echo Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ eval +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (eval r script numkeys key)
+                
+

+

is a wrapper around the eval Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ evalsha +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (evalsha r sha1 numkeys key)
+                
+

+

is a wrapper around the evalsha Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ exec +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (exec r)
+                
+

+

is a wrapper around the exec Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ exists +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (exists r key)
+                
+

+

is a wrapper around the exists Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ expire +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (expire r key seconds)
+                
+

+

is a wrapper around the expire Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ expireat +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (expireat r key timestamp)
+                
+

+

is a wrapper around the expireat Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ flushall +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (flushall r)
+                
+

+

is a wrapper around the flushall Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ flushdb +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (flushdb r)
+                
+

+

is a wrapper around the flushdb Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ geoadd +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d, e] (Result RESP String)) +

+
+                    (geoadd r key longitude latitude member)
+                
+

+

is a wrapper around the geoadd Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ geodist +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (geodist r key member1 member2)
+                
+

+

is a wrapper around the geodist Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ geohash +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (geohash r key member)
+                
+

+

is a wrapper around the geohash Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ geopos +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (geopos r key member)
+                
+

+

is a wrapper around the geopos Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ georadius +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d, e] (Result RESP String)) +

+
+                    (georadius r key longitude latitude radius)
+                
+

+

is a wrapper around the georadius Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ georadiusbymember +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (georadiusbymember r key member radius)
+                
+

+

is a wrapper around the georadiusbymember Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ get +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (get r key)
+                
+

+

is a wrapper around the get Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ getbit +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (getbit r key offset)
+                
+

+

is a wrapper around the getbit Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ getrange +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (getrange r key start end)
+                
+

+

is a wrapper around the getrange Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ getset +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (getset r key value)
+                
+

+

is a wrapper around the getset Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ hdel +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (hdel r key field)
+                
+

+

is a wrapper around the hdel Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ hexists +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (hexists r key field)
+                
+

+

is a wrapper around the hexists Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ hget +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (hget r key field)
+                
+

+

is a wrapper around the hget Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ hgetall +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (hgetall r key)
+                
+

+

is a wrapper around the hgetall Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ hincrby +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (hincrby r key field increment)
+                
+

+

is a wrapper around the hincrby Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ hincrbyfloat +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (hincrbyfloat r key field increment)
+                
+

+

is a wrapper around the hincrbyfloat Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ hkeys +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (hkeys r key)
+                
+

+

is a wrapper around the hkeys Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ hlen +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (hlen r key)
+                
+

+

is a wrapper around the hlen Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ hmget +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (hmget r key field)
+                
+

+

is a wrapper around the hmget Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ hmset +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (hmset r key field value)
+                
+

+

is a wrapper around the hmset Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ hscan +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (hscan r key cursor)
+                
+

+

is a wrapper around the hscan Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ hset +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (hset r key field value)
+                
+

+

is a wrapper around the hset Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ hsetnx +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (hsetnx r key field value)
+                
+

+

is a wrapper around the hsetnx Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ hstrlen +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (hstrlen r key field)
+                
+

+

is a wrapper around the hstrlen Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ hvals +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (hvals r key)
+                
+

+

is a wrapper around the hvals Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ incr +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (incr r key)
+                
+

+

is a wrapper around the incr Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ incrby +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (incrby r key increment)
+                
+

+

is a wrapper around the incrby Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ incrbyfloat +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (incrbyfloat r key increment)
+                
+

+

is a wrapper around the incrbyfloat Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ info +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (info r)
+                
+

+

is a wrapper around the info Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ init +

+
+
+ instantiate +
+

+ (λ [Socket] Redis) +

+ + + +

+

creates a Redis.

+ +

+
+
+ +

+ keys +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (keys r pattern)
+                
+

+

is a wrapper around the keys Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ lastsave +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (lastsave r)
+                
+

+

is a wrapper around the lastsave Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ latency-doctor +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (latency-doctor r)
+                
+

+

is a wrapper around the latency doctor Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ latency-graph +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (latency-graph r event)
+                
+

+

is a wrapper around the latency graph Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ latency-help +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (latency-help r)
+                
+

+

is a wrapper around the latency help Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ latency-history +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (latency-history r event)
+                
+

+

is a wrapper around the latency history Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ latency-latest +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (latency-latest r)
+                
+

+

is a wrapper around the latency latest Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ latency-reset +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (latency-reset r)
+                
+

+

is a wrapper around the latency reset Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ lindex +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (lindex r key index)
+                
+

+

is a wrapper around the lindex Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ linsert +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d, e] (Result RESP String)) +

+
+                    (linsert r key w pivot element)
+                
+

+

is a wrapper around the linsert Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ llen +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (llen r key)
+                
+

+

is a wrapper around the llen Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ lolwut +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (lolwut r)
+                
+

+

is a wrapper around the lolwut Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ lpop +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (lpop r key)
+                
+

+

is a wrapper around the lpop Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ lpush +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (lpush r key element)
+                
+

+

is a wrapper around the lpush Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ lpushx +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (lpushx r key element)
+                
+

+

is a wrapper around the lpushx Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ lrange +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (lrange r key start stop)
+                
+

+

is a wrapper around the lrange Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ lrem +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (lrem r key count element)
+                
+

+

is a wrapper around the lrem Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ lset +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (lset r key index element)
+                
+

+

is a wrapper around the lset Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ ltrim +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (ltrim r key start stop)
+                
+

+

is a wrapper around the ltrim Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ memory-doctor +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (memory-doctor r)
+                
+

+

is a wrapper around the memory doctor Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ memory-help +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (memory-help r)
+                
+

+

is a wrapper around the memory help Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ memory-malloc-stats +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (memory-malloc-stats r)
+                
+

+

is a wrapper around the memory malloc stats Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ memory-purge +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (memory-purge r)
+                
+

+

is a wrapper around the memory purge Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ memory-stats +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (memory-stats r)
+                
+

+

is a wrapper around the memory stats Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ memory-usage +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (memory-usage r key)
+                
+

+

is a wrapper around the memory usage Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ mget +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (mget r key)
+                
+

+

is a wrapper around the mget Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ migrate +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d, e, f] (Result RESP String)) +

+
+                    (migrate r host port key destination-db timeout)
+                
+

+

is a wrapper around the migrate Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ module-list +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (module-list r)
+                
+

+

is a wrapper around the module list Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ module-load +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (module-load r path)
+                
+

+

is a wrapper around the module load Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ module-unload +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (module-unload r name)
+                
+

+

is a wrapper around the module unload Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ monitor +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (monitor r)
+                
+

+

is a wrapper around the monitor Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ move +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (move r key db)
+                
+

+

is a wrapper around the move Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ mset +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (mset r key value)
+                
+

+

is a wrapper around the mset Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ msetnx +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (msetnx r key value)
+                
+

+

is a wrapper around the msetnx Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ multi +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (multi r)
+                
+

+

is a wrapper around the multi Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ object +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (object r subcommand)
+                
+

+

is a wrapper around the object Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ open +

+
+
+ defn +
+

+ (λ [(Ref String a)] (Result Redis String)) +

+
+                    (open host)
+                
+

+

opens the connection to Redis on port 6379.

+

For variable port numbers please check out open-on.

+ +

+
+
+ +

+ open-on +

+
+
+ defn +
+

+ (λ [(Ref String a), Int] (Result Redis String)) +

+
+                    (open-on host port)
+                
+

+

opens the connection to Redis on port port.

+ +

+
+
+ +

+ persist +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (persist r key)
+                
+

+

is a wrapper around the persist Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ pexpire +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (pexpire r key milliseconds)
+                
+

+

is a wrapper around the pexpire Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ pexpireat +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (pexpireat r key milliseconds-timestamp)
+                
+

+

is a wrapper around the pexpireat Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ pfadd +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (pfadd r key element)
+                
+

+

is a wrapper around the pfadd Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ pfcount +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (pfcount r key)
+                
+

+

is a wrapper around the pfcount Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ pfmerge +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (pfmerge r destkey sourcekey)
+                
+

+

is a wrapper around the pfmerge Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ ping +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (ping r)
+                
+

+

is a wrapper around the ping Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ prn +

+
+
+ instantiate +
+

+ (λ [(Ref Redis a)] String) +

+ + + +

+

converts a Redis to a string.

+ +

+
+
+ +

+ psetex +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (psetex r key milliseconds value)
+                
+

+

is a wrapper around the psetex Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ psubscribe +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (psubscribe r pattern)
+                
+

+

is a wrapper around the psubscribe Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ psync +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (psync r replicationid offset)
+                
+

+

is a wrapper around the psync Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ pttl +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (pttl r key)
+                
+

+

is a wrapper around the pttl Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ publish +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (publish r channel message)
+                
+

+

is a wrapper around the publish Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ pubsub +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (pubsub r subcommand)
+                
+

+

is a wrapper around the pubsub Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ punsubscribe +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (punsubscribe r)
+                
+

+

is a wrapper around the punsubscribe Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ quit +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (quit r)
+                
+

+

is a wrapper around the quit Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ randomkey +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (randomkey r)
+                
+

+

is a wrapper around the randomkey Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ read +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (read r)
+                
+

+

reads a RESP object from Redis.

+ +

+
+
+ +

+ readonly +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (readonly r)
+                
+

+

is a wrapper around the readonly Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ readwrite +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (readwrite r)
+                
+

+

is a wrapper around the readwrite Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ rename +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (rename r key newkey)
+                
+

+

is a wrapper around the rename Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ renamenx +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (renamenx r key newkey)
+                
+

+

is a wrapper around the renamenx Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ replicaof +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (replicaof r host port)
+                
+

+

is a wrapper around the replicaof Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ restore +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (restore r key ttl serialized-value)
+                
+

+

is a wrapper around the restore Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ role +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (role r)
+                
+

+

is a wrapper around the role Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ rpop +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (rpop r key)
+                
+

+

is a wrapper around the rpop Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ rpoplpush +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (rpoplpush r source destination)
+                
+

+

is a wrapper around the rpoplpush Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ rpush +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (rpush r key element)
+                
+

+

is a wrapper around the rpush Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ rpushx +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (rpushx r key element)
+                
+

+

is a wrapper around the rpushx Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ sadd +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (sadd r key member)
+                
+

+

is a wrapper around the sadd Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ save +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (save r)
+                
+

+

is a wrapper around the save Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ scan +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (scan r cursor)
+                
+

+

is a wrapper around the scan Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ scard +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (scard r key)
+                
+

+

is a wrapper around the scard Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ script-debug +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (script-debug r mode)
+                
+

+

is a wrapper around the script debug Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ script-exists +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (script-exists r sha1)
+                
+

+

is a wrapper around the script exists Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ script-flush +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (script-flush r)
+                
+

+

is a wrapper around the script flush Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ script-kill +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (script-kill r)
+                
+

+

is a wrapper around the script kill Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ script-load +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (script-load r script)
+                
+

+

is a wrapper around the script load Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ sdiff +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (sdiff r key)
+                
+

+

is a wrapper around the sdiff Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ sdiffstore +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (sdiffstore r destination key)
+                
+

+

is a wrapper around the sdiffstore Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ select +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (select r index)
+                
+

+

is a wrapper around the select Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ send +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, (Ref (Array RESP) c)] ()) +

+
+                    (send r cmd args)
+                
+

+

sends the command cmd with the arguments args to Redis.

+ +

+
+
+ +

+ set +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (set r key value)
+                
+

+

is a wrapper around the set Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ set-sock +

+
+
+ instantiate +
+

+ (λ [Redis, Socket] Redis) +

+ + + +

+

sets the sock property of a Redis.

+ +

+
+
+ +

+ set-sock! +

+
+
+ instantiate +
+

+ (λ [(Ref Redis a), Socket] ()) +

+ + + +

+

sets the sock property of a Redis in place.

+ +

+
+
+ +

+ setbit +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (setbit r key offset value)
+                
+

+

is a wrapper around the setbit Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ setex +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (setex r key seconds value)
+                
+

+

is a wrapper around the setex Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ setnx +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (setnx r key value)
+                
+

+

is a wrapper around the setnx Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ setrange +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (setrange r key offset value)
+                
+

+

is a wrapper around the setrange Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ shutdown +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (shutdown r)
+                
+

+

is a wrapper around the shutdown Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ sinter +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (sinter r key)
+                
+

+

is a wrapper around the sinter Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ sinterstore +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (sinterstore r destination key)
+                
+

+

is a wrapper around the sinterstore Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ sismember +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (sismember r key member)
+                
+

+

is a wrapper around the sismember Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ slaveof +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (slaveof r host port)
+                
+

+

is a wrapper around the slaveof Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ slowlog +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (slowlog r subcommand)
+                
+

+

is a wrapper around the slowlog Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ smembers +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (smembers r key)
+                
+

+

is a wrapper around the smembers Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ smove +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (smove r source destination member)
+                
+

+

is a wrapper around the smove Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ sock +

+
+
+ instantiate +
+

+ (λ [(Ref Redis a)] (Ref Socket a)) +

+ + + +

+

gets the sock property of a Redis.

+ +

+
+
+ +

+ sort +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (sort r key)
+                
+

+

is a wrapper around the sort Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ spop +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (spop r key)
+                
+

+

is a wrapper around the spop Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ srandmember +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (srandmember r key)
+                
+

+

is a wrapper around the srandmember Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ srem +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (srem r key member)
+                
+

+

is a wrapper around the srem Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ sscan +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (sscan r key cursor)
+                
+

+

is a wrapper around the sscan Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ str +

+
+
+ instantiate +
+

+ (λ [(Ref Redis a)] String) +

+ + + +

+

converts a Redis to a string.

+ +

+
+
+ +

+ strlen +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (strlen r key)
+                
+

+

is a wrapper around the strlen Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ subscribe +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (subscribe r channel)
+                
+

+

is a wrapper around the subscribe Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ sunion +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (sunion r key)
+                
+

+

is a wrapper around the sunion Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ sunionstore +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (sunionstore r destination key)
+                
+

+

is a wrapper around the sunionstore Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ swapdb +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (swapdb r index1 index2)
+                
+

+

is a wrapper around the swapdb Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ sync +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (sync r)
+                
+

+

is a wrapper around the sync Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ time +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (time r)
+                
+

+

is a wrapper around the time Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ touch +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (touch r key)
+                
+

+

is a wrapper around the touch Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ ttl +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (ttl r key)
+                
+

+

is a wrapper around the ttl Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ type +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (type r key)
+                
+

+

is a wrapper around the type Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ + + +
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (unlink r key)
+                
+

+

is a wrapper around the unlink Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ unsubscribe +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (unsubscribe r)
+                
+

+

is a wrapper around the unsubscribe Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ unwatch +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (unwatch r)
+                
+

+

is a wrapper around the unwatch Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ update-sock +

+
+
+ instantiate +
+

+ (λ [Redis, (Ref (λ [Socket] Socket a) b)] Redis) +

+ + + +

+

updates the sock property of a Redis using a function f.

+ +

+
+
+ +

+ wait +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (wait r numreplicas timeout)
+                
+

+

is a wrapper around the wait Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ watch +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (watch r key)
+                
+

+

is a wrapper around the watch Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ xack +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (xack r key group ID)
+                
+

+

is a wrapper around the xack Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ xadd +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d, e] (Result RESP String)) +

+
+                    (xadd r key ID field value)
+                
+

+

is a wrapper around the xadd Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ xclaim +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d, e, f] (Result RESP String)) +

+
+                    (xclaim r key group consumer min-idle-time ID)
+                
+

+

is a wrapper around the xclaim Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ xdel +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (xdel r key ID)
+                
+

+

is a wrapper around the xdel Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ xgroup +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (xgroup r)
+                
+

+

is a wrapper around the xgroup Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ xinfo +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (xinfo r)
+                
+

+

is a wrapper around the xinfo Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ xlen +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (xlen r key)
+                
+

+

is a wrapper around the xlen Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ xpending +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (xpending r key group)
+                
+

+

is a wrapper around the xpending Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ xrange +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (xrange r key start end)
+                
+

+

is a wrapper around the xrange Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ xread +

+
+
+ defn +
+

+ (λ [(Ref Redis a)] (Result RESP String)) +

+
+                    (xread r)
+                
+

+

is a wrapper around the xread Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ xreadgroup +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (xreadgroup r GROUP group consumer)
+                
+

+

is a wrapper around the xreadgroup Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ xrevrange +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (xrevrange r key end start)
+                
+

+

is a wrapper around the xrevrange Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ xtrim +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (xtrim r key MAXLEN count)
+                
+

+

is a wrapper around the xtrim Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ zadd +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (zadd r key)
+                
+

+

is a wrapper around the zadd Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ zcard +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (zcard r key)
+                
+

+

is a wrapper around the zcard Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ zcount +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (zcount r key min max)
+                
+

+

is a wrapper around the zcount Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ zincrby +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (zincrby r key increment member)
+                
+

+

is a wrapper around the zincrby Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ zinterstore +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (zinterstore r destination numkeys key)
+                
+

+

is a wrapper around the zinterstore Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ zlexcount +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (zlexcount r key min max)
+                
+

+

is a wrapper around the zlexcount Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ zpopmax +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (zpopmax r key)
+                
+

+

is a wrapper around the zpopmax Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ zpopmin +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b] (Result RESP String)) +

+
+                    (zpopmin r key)
+                
+

+

is a wrapper around the zpopmin Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ zrange +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (zrange r key start stop)
+                
+

+

is a wrapper around the zrange Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ zrangebylex +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (zrangebylex r key min max)
+                
+

+

is a wrapper around the zrangebylex Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ zrangebyscore +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (zrangebyscore r key min max)
+                
+

+

is a wrapper around the zrangebyscore Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ zrank +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (zrank r key member)
+                
+

+

is a wrapper around the zrank Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ zrem +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (zrem r key member)
+                
+

+

is a wrapper around the zrem Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ zremrangebylex +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (zremrangebylex r key min max)
+                
+

+

is a wrapper around the zremrangebylex Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ zremrangebyrank +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (zremrangebyrank r key start stop)
+                
+

+

is a wrapper around the zremrangebyrank Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ zremrangebyscore +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (zremrangebyscore r key min max)
+                
+

+

is a wrapper around the zremrangebyscore Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ zrevrange +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (zrevrange r key start stop)
+                
+

+

is a wrapper around the zrevrange Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ zrevrangebylex +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (zrevrangebylex r key max min)
+                
+

+

is a wrapper around the zrevrangebylex Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ zrevrangebyscore +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (zrevrangebyscore r key max min)
+                
+

+

is a wrapper around the zrevrangebyscore Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ zrevrank +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (zrevrank r key member)
+                
+

+

is a wrapper around the zrevrank Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ zscan +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (zscan r key cursor)
+                
+

+

is a wrapper around the zscan Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ zscore +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c] (Result RESP String)) +

+
+                    (zscore r key member)
+                
+

+

is a wrapper around the zscore Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ +

+ zunionstore +

+
+
+ defn +
+

+ (λ [(Ref Redis a), b, c, d] (Result RESP String)) +

+
+                    (zunionstore r destination numkeys key)
+                
+

+

is a wrapper around the zunionstore Redis command.

+

It takes the same arguments as the Redis command.

+ +

+
+
+ + diff --git a/docs/redis_index.html b/docs/redis_index.html new file mode 100644 index 0000000..286e28a --- /dev/null +++ b/docs/redis_index.html @@ -0,0 +1,42 @@ + + + + + + + + + +
+ + +
+

+ redis +

+

is a collection of modules for talking +to Redis.

+
(load "https://veitheller/git/carpentry/redis@master")
+
+ +
+ +
+ + diff --git a/docs/style.css b/docs/style.css new file mode 100644 index 0000000..0f7b71f --- /dev/null +++ b/docs/style.css @@ -0,0 +1,120 @@ +html { + font-family: "Hasklig", "Lucida Console", monospace; + font-size: 1.0em; +} + +p { + margin: 0em 0em 0.5em 0em; +} + +a { + color: #000; +} + +pre { + background: #f1f1f1; + padding: 10px; + overflow-x: scroll; +} + +.logo img { + display: none; +} + +.logo { + padding: 1em; + position: fixed; + top: 1em; + right: 1em; +} + +.args { + background-color: #f1f1f1; + padding: 3px; + display: inline-block; + margin-top: 0.3em; + margin-bottom: 0.3em; + white-space: normal; +} + +ul { + list-style-type: none; + line-height: 1.6em; +} + +.title { + font-size: 1.5em; +} + +.content { + margin: 3em auto auto auto; + width: 70%; + max-width: 650px; +} + +.module-description { + padding-bottom: 0.5em; + margin-bottom: 3.5em; + border-bottom: 5px solid #aaa; +} + +h1 { + margin-bottom: 1.5em; +} + +h3 { + margin: 0em; +} + +.anchor { + color: #000; + text-decoration: none; +} + +.anchor:hover { + text-decoration: underline; +} + +.binder { + margin: 0em 0em 3.5em 0em; +} + +.sig { + font-family: "Hasklig", "Lucida Console", monospace; + background-color: #f1f1f1; +} + +code { + font-family: "Hasklig", "Lucida Console", monospace; + background-color: #f1f1f1; +} + +.description { + margin-top: 0.5em; + margin-bottom: 0.5em; + font-size: 0.8em; + color: #aaa; +} + +/* Smaller screens */ +@media only screen and (max-width: 1000px) { + .logo { + margin: 1em; + text-align: left; + float: left; + width: 100%; + position: inherit; + } + .content { + margin: 0.5em; + } + .binder { + margin: 0em 0em 1.5em 0em; + } + .sig { + font-size: 0.9em; + } + ul { + padding: 0px; + } +} diff --git a/examples/simple.carp b/examples/simple.carp index 4419a43..9651970 100644 --- a/examples/simple.carp +++ b/examples/simple.carp @@ -1,4 +1,4 @@ -(load "https://veitheller.de/git/carpentry/redis.git@master") +(load "redis.carp") (defn main [] (match (Redis.open "127.0.0.1") diff --git a/gendocs.carp b/gendocs.carp new file mode 100644 index 0000000..526f1c2 --- /dev/null +++ b/gendocs.carp @@ -0,0 +1,17 @@ +(load "redis.carp") + +(Project.config "title" "redis") +(Project.config "docs-directory" "./docs/") +(Project.config "docs-logo" "") +(Project.config "docs-url" "https://veitheller/git/carpentry/redis") +(Project.config "docs-styling" "style.css") +(Project.config "docs-prelude" "is a collection of modules for talking +to Redis. + +``` +(load \"https://veitheller/git/carpentry/redis@master\") +``` +") + +(save-docs RESP Redis) +(quit) diff --git a/redis.carp b/redis.carp index 2ef389a..a3b20d7 100644 --- a/redis.carp +++ b/redis.carp @@ -12,7 +12,8 @@ (defmodule RESP (use-all Array Int Maybe Pattern Result) - (def separator "\r\n") + (hidden c) + (private c) (def c (prn &@&[@""])) (defn str [r] @@ -23,6 +24,8 @@ (Integer i) (fmt ":%d\r\n" i) (Arr a) (fmt "*%d\r\n%s" (length &a) &(concat &a)))) + (hidden decode-bulk-string) + (private decode-bulk-string) (defn decode-bulk-string [s] (if (starts-with? s "-1\r\n") (Success (Null)) @@ -34,17 +37,22 @@ (String.prefix-string &(join "\r\n" &(suffix-array &splt 1)) (from-string l)))))))) + (hidden agg) + (private agg) (defn agg [els len] (let-do [consumed 0 clen 0] - (foreach [el els] - (if (>= clen len) - (break) - (do - (set! consumed (inc consumed)) - (set! clen (+ 2 (+ clen (length el))))))) + (for [i 0 len] + (let [el (unsafe-nth els i)] + (if (>= clen len) + (break) + (do + (set! consumed (inc consumed)) + (set! clen (+ 2 (+ clen (length el)))))))) consumed)) + (hidden decode-arr) + (private decode-arr) (defn decode-arr [s] (if (starts-with? s "*0\r\n") (Success (Null)) @@ -77,6 +85,7 @@ (Success (Arr a)) (Error @err))))))) + (doc from-string "converts a RESP string into a `RESP` data structure.") (defn from-string [s] (if (empty? s) (Success (Null)) @@ -87,9 +96,9 @@ \$ (decode-bulk-string &(tail s)) \* (decode-arr &(tail s)) (Error (fmt "Malformed RESP data: got %s" s))))) -) -(definterface to-redis (Fn [a] RESP)) + (definterface to-redis (Fn [a] RESP)) +) (defmodule String (defn to-redis [s] (RESP.Str s)) @@ -106,22 +115,28 @@ (defmodule Redis (use-all Array Result Socket) + (doc open-on "opens the connection to Redis on port `port`.") (defn open-on [host port] (let [s (setup-client host port)] (if (valid? &s) (Success (init s)) (Error (fmt "Couldn’t connect to %s:%d" host port))))) + (doc open "opens the connection to Redis on port 6379. + +For variable port numbers please check out [`open-on`](#open-on).") (defn open [host] (open-on host 6379)) + (doc read "reads a `RESP` object from Redis.") (defn read [r] (RESP.from-string &(Socket.read (sock r)))) + (doc send "sends the command `cmd` with the arguments `args` to Redis.") (defn send [r cmd args] (if (empty? args) (Socket.send (sock r) &(fmt "%s\r\n" &cmd)) (Socket.send (sock r) &(str &(RESP.Arr (concat &[[(str &(to-redis cmd))] (copy-map &RESP.str args)])))))) + (doc close "closes the connection to Redis.") (defn close [r] (Socket.close @(sock &r))) - ) (defndynamic rtreat- [s] @@ -150,6 +165,8 @@ It takes the same arguments as the [Redis command](https://redis.io/commands/" (list 'Redis.send 'r (list 'copy (rtreat- (Symbol.str cmd))) (list 'ref (rconv- args))) '(Redis.read r))))) +; these commands were scraped from redis.io on the 9th of Feb 2020 + (defredis append key value) (defredis auth password) (defredis bgrewriteaof) @@ -391,3 +408,16 @@ It takes the same arguments as the [Redis command](https://redis.io/commands/" (defredis latency-latest) (defredis latency-reset) (defredis latency-help) +(doc Redis "is a wrapper around Redis connections. It supports opening a +connection using [`open`](#open) or [`open-on`](#open-on), reading from and +sending to the connection (using [`read`](#read) and [`send`](#send), +respectively), and contains thin wrappers around all Redis commands (everything +else).") +(doc RESP "is a wrapper around the [Redis Serialization +Protocol](https://redis.io/topics/protocol). You can create all types—though +creating arrays is a little unsightly due to the absence of recursive types—, +stringify the built types into strings using [`str`](#str), and decoding from +the string protocol using [`from-string`](#from-string). + +If you want your types to be supported when encoding, you’ll have to implement +the interface `to-redis`, the signature of which is `(Fn [a] RESP))`.")