Liking cljdoc? Tell your friends :D

accession.core


append

(append key value)

auth

(auth password)

bgsave

(bgsave)

bgwriteaof

(bgwriteaof)

blpop

(blpop key timeout)

brpop

(brpop key timeout)

brpoplpush

(brpoplpush source destination timeout)

connection-map

(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

dbsize

(dbsize)

decr

(decr key)

decrby

(decrby key increment)

defqueriesmacro

(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

defquerymacro

(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

del

(del key & keys)

discard

(discard)

echo

(echo message)

exec

(exec)

exists

(exists key)

expire

(expire key seconds)

expireat

(expireat key seconds)

flushall

(flushall)

flushdb

(flushdb)

get

(get key)

getbit

(getbit key offset)

getrange

(getrange key start end)

getset

(getset key value)

hdel

(hdel key field & fields)

hexists

(hexists key field)

hget

(hget key field)

hgetall

(hgetall key)

hincrby

(hincrby key field increment)

hkeys

(hkeys key)

hlen

(hlen key)

hmget

(hmget key field & fields)

hmset

(hmset key field value & pairs)

hset

(hset key field value)

hsetnx

(hsetnx key field value)

hvals

(hvals key)

incr

(incr key)

incrby

(incrby key increment)

info

(info)

IRedisChannelprotocol

close
(close this)

ISubscribableprotocol

subscribe
(subscribe this channels)

IUnsubscribableprotocol

unsubscribe
(unsubscribe this channels)

keys

(keys pattern)

lastsave

(lastsave)

lindex

(lindex key index)

linsert

(linsert key before-after pivot value)

llen

(llen key)

lpop

(lpop key)

lpush

(lpush key value)

lpushx

(lpushx key value & values)

lrange

(lrange key start end)

lrem

(lrem key count value)

lset

(lset key value index)

ltrim

(ltrim key start stop)

mget

(mget key & keys)

monitor

(monitor)

move

(move key db)

mset

(mset key value & pairs)

msetnx

(msetnx key value & pairs)

multi

(multi)

object

(object subcommand & arguments)

open-channel

(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

parameters

(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

persist

(persist key)

ping

(ping)

publish

(publish channel message)

query

(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

quit

(quit)

randomkey

(randomkey)

receive-message

(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

rename

(rename key newkey)

renamenx

(renamenx key newkey)

request

(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

responsemultimethod

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

rpop

(rpop key)

rpoplpush

(rpoplpush source destination)

rpush

(rpush key value & values)

rpushx

(rpushx key value)

sadd

(sadd key member & members)

save

(save)

scard

(scard key)

sdiff

(sdiff key & keys)

sdiffstore

(sdiffstore destination set1 set2)

select

(select index)

set

(set key value)

setbit

(setbit key offset value)

setex

(setex key seconds value)

setnx

(setnx key value)

setrange

(setrange key offset value)

shutdown

(shutdown)

sinter

(sinter key & keys)

sinterstore

(sinterstore destination key & keys)

sismember

(sismember key member)

slaveof

(slaveof host port)

slowlog

(slowlog command argument)

smembers

(smembers key)

smove

(smove source desination member)

sort

(sort key & options)

spop

(spop key)

srandmember

(srandmember key)

srem

(srem key member & members)

strlen

(strlen key)

sunion

(sunion key & keys)

sunionstore

(sunionstore destination key & keys)

sync

(sync)

ttl

(ttl key)

type

(type key)

unwatch

(unwatch)

watch

(watch key & keys)

with-connection

(with-connection spec & body)

write-commands

(write-commands out command channels)

Sends commands out to the specified channels

Sends commands out to the specified channels 
raw docstring

zadd

(zadd key score member & more)

zcard

(zcard key)

zcount

(zcount key min max)

zincrby

(zincrby key increment member)

zinterstore

(zinterstore dest-key source-keys & options)

zrange

(zrange key start stop)

zrangebyscore

(zrangebyscore key min max & more)

zrank

(zrank member)

zrem

(zrem key member & members)

zremrangebyrank

(zremrangebyrank key start stop)

zremrangebyscore

(zremrangebyscore key min max)

zrevrange

(zrevrange key start stop & more)

zrevrangebyscore

(zrevrangebyscore key max min & more)

zrevrank

(zrevrank key member)

zscore

(zscore key member)

zunionstore

(zunionstore dest-key source-keys & options)

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

× close