Liking cljdoc? Tell your friends :D

crimson.core


decrclj

(decr conn-or-pool k)

Decrements the numeric value of a key. https://redis.io/commands/decr

Params:

  • conn-or-pool: An instance of Jedis/JedisPool
  • k: a string key
Decrements the numeric value of a key. https://redis.io/commands/decr

Params:
  - conn-or-pool: An instance of `Jedis`/`JedisPool`
  - k: a string key
raw docstring

deleteclj

(delete conn-or-pool k)

Deletes a key from redis.

Params:

  • conn-or-pool: An instance of Jedis/JedisPool
  • k: a string key
Deletes a key from redis.

Params:
  - conn-or-pool: An instance of `Jedis`/`JedisPool`
  - k: a string key
raw docstring

discard-transactionclj

(discard-transaction transaction)

Discards the current transaction when called inside a with-multi block.

Discards the current transaction when called inside a `with-multi` block.
raw docstring

evalclj

(eval conn-or-pool script keys args)

Evaluates a Lua script in Redis. https://redis.io/commands/eval

Params:

  • conn-or-pool: An instance of Jedis/JedisPool
  • script: the Lua script to be run
  • keys: a list of keys to be used as arguments to the script
  • args: a list of arguments (which are not keys) to be used by the script
Evaluates a Lua script in Redis. https://redis.io/commands/eval

Params:
  - conn-or-pool: An instance of `Jedis`/`JedisPool`
  - script: the Lua script to be run
  - keys: a list of keys to be used as arguments to the script
  - args: a list of arguments (which are not keys) to be used by the script
raw docstring

exists?clj

(exists? conn-or-pool k)

Check if a key exists. Returns true/false. https://redis.io/commands/exists

Params:

  • conn-or-pool: An instance of Jedis/JedisPool
  • k: a string key
Check if a key exists. Returns true/false. https://redis.io/commands/exists

Params:
  - conn-or-pool: An instance of `Jedis`/`JedisPool`
  - k: a string key
raw docstring

expireclj

(expire conn-or-pool k seconds)

Sets the TTL of a key. https://redis.io/commands/expire

Params:

  • conn-or-pool: An instance of Jedis/JedisPool
  • k: a string key
  • seconds: the TTL in seconds
Sets the TTL of a key. https://redis.io/commands/expire

Params:
  - conn-or-pool: An instance of `Jedis`/`JedisPool`
  - k: a string key
  - seconds: the TTL in seconds
raw docstring

expire-atclj

(expire-at conn-or-pool k unix-timestamp)

Sets the TTL of a key to expire at a particular time. https://redis.io/commands/expireat

Params:

  • conn-or-pool: An instance of Jedis/JedisPool
  • k: a string key
  • unix-timestamp: the Unix epoch representing the expiration date, as a Long
Sets the TTL of a key to expire at a particular time. https://redis.io/commands/expireat

Params:
  - conn-or-pool: An instance of `Jedis`/`JedisPool`
  - k: a string key
  - unix-timestamp: the Unix epoch representing the expiration date, as a Long
raw docstring

flush-all!clj

(flush-all! conn-or-pool)

Removes all keys from all databases in redis

Params:

  • conn-or-pool: An instance of Jedis/JedisPool
Removes all keys from all databases in redis

Params:
 - conn-or-pool: An instance of `Jedis`/`JedisPool`
raw docstring

getclj

(get conn-or-pool k)

Reads a key from redis.

Params:

  • conn-or-pool: An instance of Jedis/JedisPool
  • k: a string key
Reads a key from redis.

Params:
 - conn-or-pool: An instance of `Jedis`/`JedisPool`
 - k: a string key
raw docstring

hdelclj

(hdel conn-or-pool key & fields)

Removes the specified fields from the hash stored at key Params:

  • conn-or-pool: An instance of Jedis/JedisPool/JedisCluster
  • key: a string key
  • field: a variadic string fields
Removes the specified fields from the hash stored at key
Params:
 - conn-or-pool: An instance of `Jedis`/`JedisPool`/`JedisCluster`
 - key: a string key
 - field: a variadic string fields
raw docstring

hgetclj

(hget conn-or-pool key field)

Returns the value associated with field in the hash stored at key Params:

  • conn-or-pool: An instance of Jedis/JedisPool/JedisCluster
  • key: a string key
  • field: a string field
Returns the value associated with field in the hash stored at key
Params:
 - conn-or-pool: An instance of `Jedis`/`JedisPool`/`JedisCluster`
 - key: a string key
 - field: a string field
raw docstring

hgetallclj

(hgetall conn-or-pool k)

Returns all fields and values of the hash stored for a given key

  • conn-or-pool: An instance of Jedis/JedisPool/JedisCluster
  • k: a string key
Returns all fields and values of the hash stored for a given key
- conn-or-pool: An instance of `Jedis`/`JedisPool`/`JedisCluster`
- k: a string key
raw docstring

hsetclj

(hset conn-or-pool k value)

Writes a clojure map against a key in redis Params:

  • conn-or-pool: An instance of Jedis/JedisPool/JedisCluster
  • k: a string key
  • value: a clojure map
Writes a clojure map against a key in redis
Params:
 - conn-or-pool: An instance of `Jedis`/`JedisPool`/`JedisCluster`
 - k: a string key
 - value: a clojure map
raw docstring

incrclj

(incr conn-or-pool k)

Increments the numeric value of a key.

https://redis.io/commands/incr

Params:

  • conn-or-pool: An instance of Jedis/JedisPool
  • k: a string key
Increments the numeric value of a key.

https://redis.io/commands/incr

Params:
  - conn-or-pool: An instance of `Jedis`/`JedisPool`
  - k: a string key
raw docstring

iteration-start-cursorclj


mgetclj

(mget conn-or-pool keys)

Returns the values of all specified keys. For every key that does not hold a string value or does not exist, the special value nil is returned.

Params:

  • conn-or-pool: An instance of Jedis/JedisPool
  • keys: A list of keys
Returns the values of all specified keys.
For every key that does not hold a string value or does not exist, the special value nil is returned.

Params:
  - conn-or-pool: An instance of `Jedis`/`JedisPool`
  - keys: A list of keys
raw docstring

msetclj

(mset conn-or-pool key-value-pairs)

Sets the given keys to their respective values.

Params:

  • conn-or-pool: An instance of Jedis/JedisPool
  • key-value-pairs: A list of key-value pairs
Sets the given keys to their respective values.

Params:
  - conn-or-pool: An instance of `Jedis`/`JedisPool`
  - key-value-pairs: A list of key-value pairs
raw docstring

saddclj

(sadd conn-or-pool key & members)

Add the specified members to the set stored at key

Params:

  • conn-or-pool: An instance of Jedis/JedisPool/JedisCluster
  • k: a string key
  • v: a variadic string values
Add the specified members to the set stored at key

Params:
 - conn-or-pool: An instance of `Jedis`/`JedisPool`/`JedisCluster`
 - k: a string key
 - v: a variadic string values
raw docstring

scanclj

(scan conn-or-pool key-pattern)

Returns a set of all keys that match the provided pattern https://redis.io/commands/scan Params:

  • conn-or-pool: An instance of Jedis/JedisPool
  • key-regex: a string key pattern
Returns a set of all keys that match the provided pattern https://redis.io/commands/scan
Params:
 - conn-or-pool: An instance of `Jedis`/`JedisPool`
 - key-regex: a string key pattern
raw docstring

setclj

(set conn-or-pool k v)
(set conn-or-pool k v {:keys [ttl] :as options})

Writes a value against a key to redis.

Params:

  • conn-or-pool: An instance of Jedis/JedisPool
  • k: a string key
  • v: a string value
Writes a value against a key to redis.

Params:
 - conn-or-pool: An instance of `Jedis`/`JedisPool`
 - k: a string key
 - v: a string value
raw docstring

smembersclj

(smembers conn-or-pool key)

Returns all the members of the set value stored at key

Params:

  • conn-or-pool: An instance of Jedis/JedisPool/JedisCluster
  • k: a string key
Returns all the members of the set value stored at key

Params:
 - conn-or-pool: An instance of `Jedis`/`JedisPool`/`JedisCluster`
 - k: a string key
raw docstring

sremclj

(srem conn-or-pool key & members)

Remove the specified members from the set stored at key

Params:

  • conn-or-pool: An instance of Jedis/JedisPool/JedisCluster
  • k: a string key
  • v: a variadic string values
Remove the specified members from the set stored at key

Params:
 - conn-or-pool: An instance of `Jedis`/`JedisPool`/`JedisCluster`
 - k: a string key
 - v: a variadic string values
raw docstring

with-conncljmacro

(with-conn [var-sym redis-pool] & body)

Evaluates body in a try-catch expression with the provided name bound to a connection resource from the pool and finally returns the connection back to the pool.

Evaluates body in a try-catch expression with the provided name
bound to a connection resource from the pool and finally returns
the connection back to the pool.
raw docstring

with-multicljmacro

(with-multi [var-sym pool] & body)

Evaluates body inside a redis MULTI transaction. The provided name is bound to a resource from the pool, using which a transaction is created. The connection will be returned back to the pool at the end of the transaction.

Also, see discard-transaction.

Refer https://redis.io/topics/transactions for details on how transactions work.

Evaluates body inside a redis `MULTI` transaction. The provided name
is bound to a resource from the pool, using which a transaction
is created. The connection will be returned back to the pool at
the end of the transaction.

Also, see `discard-transaction`.

Refer https://redis.io/topics/transactions for details on how
transactions work.
raw docstring

zaddclj

(zadd conn-or-pool k v)

Writes a sorted set against a key to redis

Params:

  • conn-or-pool: An instance of Jedis/JedisPool/JedisCluster
  • k: a string key
  • v: value as a clojure map of the following format {^String :member ^Double score}
Writes a sorted set against a key to redis

Params:
 - conn-or-pool: An instance of `Jedis`/`JedisPool`/`JedisCluster`
 - k: a string key
 - v: value as a clojure map of the following format `{^String :member ^Double score}`
raw docstring

zrangeclj

(zrange conn-or-pool k start end)

Return a range of members in a sorted set, by index. Params:

  • conn-or-pool: An instance of Jedis/JedisPool/JedisCluster
  • k: a string key
  • start: an integer index
  • end: an integer index. They can also be negative numbers indicating offsets from the end of the sorted set
Return a range of members in a sorted set, by index.
Params:
 - conn-or-pool: An instance of `Jedis`/`JedisPool`/`JedisCluster`
 - k: a string key
 - start: an integer index
 - end: an integer index. They can also be negative numbers indicating offsets from the end of the sorted set
raw docstring

zrange-with-scoreclj

(zrange-with-score conn-or-pool k start end)

Return a range of members in a sorted set, by index along with their scores Each element in the collection returned in the format: [^Double score ^String member] Params:

  • conn-or-pool: An instance of Jedis/JedisPool/JedisCluster
  • k: a string key
  • start: an integer index
  • end: an integer index. They can also be negative numbers indicating offsets from the end of the sorted set
Return a range of members in a sorted set, by index along with their scores
Each element in the collection returned in the format: `[^Double score ^String member]`
Params:
 - conn-or-pool: An instance of `Jedis`/`JedisPool`/`JedisCluster`
 - k: a string key
 - start: an integer index
 - end: an integer index. They can also be negative numbers indicating offsets from the end of the sorted set
raw docstring

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

× close