Liking cljdoc? Tell your friends :D

accession.core


appendclj

(append key value)

authclj

(auth password)

bgsaveclj

(bgsave)

bgwriteaofclj

(bgwriteaof)

blpopclj

(blpop key timeout)

brpopclj

(brpop key timeout)

brpoplpushclj

(brpoplpush source destination timeout)

connection-mapclj

(connection-map)
(connection-map spec)

Creates the initial connection spec. Options can be overridden by passing in a map. The following keys are valid:

:host :port :password :socket :timeout

Although passing in your own socket is not recommended and will probably cause more problems than it solves

Creates the initial connection spec. Options can be overridden by
passing in a map. The following keys are valid:

:host
:port
:password
:socket
:timeout

Although passing in your own socket is not recommended and will
probably cause more problems than it solves
raw docstring

dbsizeclj

(dbsize)

decrclj

(decr key)

decrbyclj

(decrby key increment)

defqueriescljmacro

(defqueries & queries)

Given any number of redis commands and argument lists, convert them to function definitions.

This is an interesting use of unquote splicing. Unquote splicing works on a sequence and that sequence can be the result of a function call as it is here. The function which produces this sequence maps each argument passed to this macro over a function which takes each list like (set [key value]), binds it to q, and uses unquote splicing again to create a call to defquery which looks like (defquery set [key value]).

Finally, a macro can only return a single form, so we wrap all of the produced expressions in a do special form.

Given any number of redis commands and argument lists, convert them
to function definitions.

This is an interesting use of unquote splicing. Unquote splicing
works on a sequence and that sequence can be the result of a
function call as it is here. The function which produces this
sequence maps each argument passed to this macro over a function
which takes each list like (set [key value]), binds it to q, and
uses unquote splicing again to create a call to defquery which
looks like (defquery set [key value]).

Finally, a macro can only return a single form, so we wrap all of
the produced expressions in a do special form.
raw docstring

defquerycljmacro

(defquery name params)

Given a redis command and a parameter list, create a function of the form:

 (defn <name> <parameter-list>
   (query <command> <p1> <p2> ... <pN>))

The name which is passed is a symbol and is first used as a symbol for the function name. We convert this symbol to a string and use that string as the command name.

params is a list of N symbols which represent the parameters to the function. We use this list as the parameter-list when we create the function. Each symbol in this list will be an argument to query after the command. We use unquote splicing (~@) to insert these arguments after the command string.

Given a redis command and a parameter list, create a function of
 the form:

     (defn <name> <parameter-list>
       (query <command> <p1> <p2> ... <pN>))

The name which is passed is a symbol and is first used as a symbol
for the function name. We convert this symbol to a string and use
that string as the command name.

params is a list of N symbols which represent the parameters to the
function. We use this list as the parameter-list when we create the
function. Each symbol in this list will be an argument to query
after the command. We use unquote splicing (~@) to insert these
arguments after the command string.
raw docstring

delclj

(del key & keys)

discardclj

(discard)

echoclj

(echo message)

execclj

(exec)

existsclj

(exists key)

expireclj

(expire key seconds)

expireatclj

(expireat key seconds)

flushallclj

(flushall)

flushdbclj

(flushdb)

getclj

(get key)

getbitclj

(getbit key offset)

getrangeclj

(getrange key start end)

getsetclj

(getset key value)

hdelclj

(hdel key field & fields)

hexistsclj

(hexists key field)

hgetclj

(hget key field)

hgetallclj

(hgetall key)

hincrbyclj

(hincrby key field increment)

hkeysclj

(hkeys key)

hlenclj

(hlen key)

hmgetclj

(hmget key field & fields)

hmsetclj

(hmset key field value & pairs)

hsetclj

(hset key field value)

hsetnxclj

(hsetnx key field value)

hvalsclj

(hvals key)

incrclj

(incr key)

incrbyclj

(incrby key increment)

infoclj

(info)

IRedisChannelcljprotocol

closeclj

(close this)

ISubscribablecljprotocol

subscribeclj

(subscribe this channels)

IUnsubscribablecljprotocol

unsubscribeclj

(unsubscribe this channels)

keysclj

(keys pattern)

lastsaveclj

(lastsave)

lindexclj

(lindex key index)

linsertclj

(linsert key before-after pivot value)

llenclj

(llen key)

lpopclj

(lpop key)

lpushclj

(lpush key value)

lpushxclj

(lpushx key value & values)

lrangeclj

(lrange key start end)

lremclj

(lrem key count value)

lsetclj

(lset key value index)

ltrimclj

(ltrim key start stop)

mgetclj

(mget key & keys)

monitorclj

(monitor)

moveclj

(move key db)

msetclj

(mset key value & pairs)

msetnxclj

(msetnx key value & pairs)

multiclj

(multi)

objectclj

(object subcommand & arguments)

open-channelclj

(open-channel conn command channels)

Takes a connection and sets up a connection to a Redis channel with the provided functions as callbacks to invoke when messages are received

Takes a connection and sets up a connection to a Redis channel with
the provided functions as callbacks to invoke when messages are
received
raw docstring

parametersclj

(parameters params)

This function enables vararg style definitions in the queries. For example you can write:

 (mget [key & keys])

and the defquery macro will properly expand out into a variable argument function

This function enables vararg style definitions in the queries. For
example you can write:

     (mget [key & keys])

and the defquery macro will properly expand out into a variable
argument function
raw docstring

persistclj

(persist key)

pingclj

(ping)

publishclj

(publish channel message)

queryclj

(query name & args)

The new unified protocol was introduced in Redis 1.2, but it became the standard way for talking with the Redis server in Redis 2.0. In the unified protocol all the arguments sent to the Redis server are binary safe. This is the general form:

*<number of arguments> CR LF
$<number of bytes of argument 1> CR LF
<argument data> CR LF
...
$<number of bytes of argument N> CR LF
<argument data> CR LF

See the following example:

*3
$3
SET
$5
mykey
$7
myvalue

This is how the above command looks as a quoted string, so that it is possible to see the exact value of every byte in the query:

The new [unified protocol][up] was introduced in Redis 1.2, but it became
the standard way for talking with the Redis server in Redis 2.0.
In the unified protocol all the arguments sent to the Redis server
are binary safe. This is the general form:

    *<number of arguments> CR LF
    $<number of bytes of argument 1> CR LF
    <argument data> CR LF
    ...
    $<number of bytes of argument N> CR LF
    <argument data> CR LF

See the following example:

    *3
    $3
    SET
    $5
    mykey
    $7
    myvalue

This is how the above command looks as a quoted string, so that it
is possible to see the exact value of every byte in the query:

[up]: http://redis.io/topics/protocol
raw docstring

quitclj

(quit)

randomkeyclj

(randomkey)

receive-messageclj

(receive-message channel-spec in)

Used in conjunction with an open channel to handle messages that arrive. Takes a channel spec and a message

Used in conjunction with an open channel to handle messages that
arrive. Takes a channel spec and a message
raw docstring

renameclj

(rename key newkey)

renamenxclj

(renamenx key newkey)

requestclj

(request conn & query)

Responsible for actually making the request to the Redis server. Sets the timeout on the socket if one was specified.

Responsible for actually making the request to the Redis
server. Sets the timeout on the socket if one was specified.
raw docstring

responsecljmultimethod

Redis will reply to commands with different kinds of replies. It is possible to check the kind of reply from the first byte sent by the server:

  • With a single line reply the first byte of the reply will be +
  • With an error message the first byte of the reply will be -
  • With an integer number the first byte of the reply will be :
  • With bulk reply the first byte of the reply will be $
  • With multi-bulk reply the first byte of the reply will be *
Redis will reply to commands with different kinds of replies. It is
possible to check the kind of reply from the first byte sent by the
server:

* With a single line reply the first byte of the reply will be `+`
* With an error message the first byte of the reply will be `-`
* With an integer number the first byte of the reply will be `:`
* With bulk reply the first byte of the reply will be `$`
* With multi-bulk reply the first byte of the reply will be `*`
raw docstring

rpopclj

(rpop key)

rpoplpushclj

(rpoplpush source destination)

rpushclj

(rpush key value & values)

rpushxclj

(rpushx key value)

saddclj

(sadd key member & members)

saveclj

(save)

scardclj

(scard key)

sdiffclj

(sdiff key & keys)

sdiffstoreclj

(sdiffstore destination set1 set2)

selectclj

(select index)

setclj

(set key value)

setbitclj

(setbit key offset value)

setexclj

(setex key seconds value)

setnxclj

(setnx key value)

setrangeclj

(setrange key offset value)

shutdownclj

(shutdown)

sinterclj

(sinter key & keys)

sinterstoreclj

(sinterstore destination key & keys)

sismemberclj

(sismember key member)

slaveofclj

(slaveof host port)

slowlogclj

(slowlog command argument)

smembersclj

(smembers key)

smoveclj

(smove source desination member)

sortclj

(sort key & options)

spopclj

(spop key)

srandmemberclj

(srandmember key)

sremclj

(srem key member & members)

strlenclj

(strlen key)

sunionclj

(sunion key & keys)

sunionstoreclj

(sunionstore destination key & keys)

syncclj

(sync)

ttlclj

(ttl key)

typeclj

(type key)

unwatchclj

(unwatch)

watchclj

(watch key & keys)

with-connectionclj

(with-connection spec & body)

write-commandsclj

(write-commands out command channels)

Sends commands out to the specified channels

Sends commands out to the specified channels 
raw docstring

zaddclj

(zadd key score member & more)

zcardclj

(zcard key)

zcountclj

(zcount key min max)

zincrbyclj

(zincrby key increment member)

zinterstoreclj

(zinterstore dest-key source-keys & options)

zrangeclj

(zrange key start stop)

zrangebyscoreclj

(zrangebyscore key min max & more)

zrankclj

(zrank member)

zremclj

(zrem key member & members)

zremrangebyrankclj

(zremrangebyrank key start stop)

zremrangebyscoreclj

(zremrangebyscore key min max)

zrevrangeclj

(zrevrange key start stop & more)

zrevrangebyscoreclj

(zrevrangebyscore key max min & more)

zrevrankclj

(zrevrank key member)

zscoreclj

(zscore key member)

zunionstoreclj

(zunionstore dest-key source-keys & options)

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

× close