{-# LANGUAGE OverloadedStrings, FlexibleContexts #-}
module Database.Redis.Commands (
auth,
echo,
ping,
quit,
select,
del,
dump,
exists,
expire,
expireat,
keys,
MigrateOpts(..),
defaultMigrateOpts,
migrate,
migrateMultiple,
move,
objectRefcount,
objectEncoding,
objectIdletime,
persist,
pexpire,
pexpireat,
pttl,
randomkey,
rename,
renamenx,
restore,
restoreReplace,
Cursor,
cursor0,
ScanOpts(..),
defaultScanOpts,
scan,
scanOpts,
SortOpts(..),
defaultSortOpts,
SortOrder(..),
sort,
sortStore,
ttl,
RedisType(..),
getType,
wait,
hdel,
hexists,
hget,
hgetall,
hincrby,
hincrbyfloat,
hkeys,
hlen,
hmget,
hmset,
hscan,
hscanOpts,
hset,
hsetnx,
hstrlen,
hvals,
pfadd,
pfcount,
pfmerge,
blpop,
brpop,
brpoplpush,
lindex,
linsertBefore,
linsertAfter,
llen,
lpop,
lpush,
lpushx,
lrange,
lrem,
lset,
ltrim,
rpop,
rpoplpush,
rpush,
rpushx,
eval,
evalsha,
DebugMode,
scriptDebug,
scriptExists,
scriptFlush,
scriptKill,
scriptLoad,
bgrewriteaof,
bgsave,
clientGetname,
clientList,
clientPause,
ReplyMode,
clientReply,
clientSetname,
commandCount,
commandInfo,
configGet,
configResetstat,
configRewrite,
configSet,
dbsize,
debugObject,
flushall,
flushdb,
info,
infoSection,
lastsave,
save,
slaveof,
Slowlog(..),
slowlogGet,
slowlogLen,
slowlogReset,
time,
sadd,
scard,
sdiff,
sdiffstore,
sinter,
sinterstore,
sismember,
smembers,
smove,
spop,
spopN,
srandmember,
srandmemberN,
srem,
sscan,
sscanOpts,
sunion,
sunionstore,
ZaddOpts(..),
defaultZaddOpts,
zadd,
zaddOpts,
zcard,
zcount,
zincrby,
Aggregate(..),
zinterstore,
zinterstoreWeights,
zlexcount,
zrange,
zrangeWithscores,
RangeLex(..),
zrangebylex, zrangebylexLimit,
zrangebyscore,
zrangebyscoreWithscores,
zrangebyscoreLimit,
zrangebyscoreWithscoresLimit,
zrank,
zrem,
zremrangebylex,
zremrangebyrank,
zremrangebyscore,
zrevrange,
zrevrangeWithscores,
zrevrangebyscore,
zrevrangebyscoreWithscores,
zrevrangebyscoreLimit,
zrevrangebyscoreWithscoresLimit,
zrevrank,
zscan,
zscanOpts,
zscore,
zunionstore,
zunionstoreWeights,
append,
bitcount,
bitcountRange,
bitopAnd,
bitopOr,
bitopXor,
bitopNot,
bitpos,
decr,
decrby,
get,
getbit,
getrange,
getset,
incr,
incrby,
incrbyfloat,
mget,
mset,
msetnx,
psetex,
Condition(..),
SetOpts(..),
set,
setOpts,
setbit,
setex,
setnx,
setrange,
strlen,
XReadOpts(..),
defaultXreadOpts,
XReadResponse(..),
StreamsRecord(..),
TrimOpts(..),
xadd,
xaddOpts,
xread,
xreadOpts,
xreadGroup,
xreadGroupOpts,
xack,
xgroupCreate,
xgroupSetId,
xgroupDestroy,
xgroupDelConsumer,
xrange,
xrevRange,
xlen,
XPendingSummaryResponse(..),
xpendingSummary,
XPendingDetailRecord(..),
xpendingDetail,
XClaimOpts(..),
defaultXClaimOpts,
xclaim,
xclaimJustIds,
XInfoConsumersResponse(..),
xinfoConsumers,
XInfoGroupsResponse(..),
xinfoGroups,
XInfoStreamResponse(..),
xinfoStream,
xdel,
xtrim,
inf,
ClusterNodesResponse(..),
ClusterNodesResponseEntry(..),
ClusterNodesResponseSlotSpec(..),
clusterNodes,
ClusterSlotsResponse(..),
ClusterSlotsResponseEntry(..),
ClusterSlotsNode(..),
clusterSlots,
clusterSetSlotNode,
clusterSetSlotStable,
clusterSetSlotImporting,
clusterSetSlotMigrating,
clusterGetKeysInSlot,
command
) where
import Prelude hiding (min,max)
import Data.ByteString (ByteString)
import Database.Redis.ManualCommands
import Database.Redis.Types
import Database.Redis.Core(sendRequest, RedisCtx)
ttl
:: (RedisCtx m f)
=> ByteString
-> m (f Integer)
ttl :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f Integer)
ttl ByteString
key = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"TTL"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] )
setnx
:: (RedisCtx m f)
=> ByteString
-> ByteString
-> m (f Bool)
setnx :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> ByteString -> m (f Bool)
setnx ByteString
key ByteString
value = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"SETNX"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
value] )
pttl
:: (RedisCtx m f)
=> ByteString
-> m (f Integer)
pttl :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f Integer)
pttl ByteString
key = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"PTTL"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] )
commandCount
:: (RedisCtx m f)
=> m (f Integer)
commandCount :: forall (m :: * -> *) (f :: * -> *). RedisCtx m f => m (f Integer)
commandCount = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"COMMAND",ByteString
"COUNT"] )
clientSetname
:: (RedisCtx m f)
=> ByteString
-> m (f ByteString)
clientSetname :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f ByteString)
clientSetname ByteString
connectionName = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"CLIENT",ByteString
"SETNAME"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
connectionName] )
zrank
:: (RedisCtx m f)
=> ByteString
-> ByteString
-> m (f (Maybe Integer))
zrank :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> ByteString -> m (f (Maybe Integer))
zrank ByteString
key ByteString
member = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"ZRANK"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
member] )
zremrangebyscore
:: (RedisCtx m f)
=> ByteString
-> Double
-> Double
-> m (f Integer)
zremrangebyscore :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> Double -> Double -> m (f Integer)
zremrangebyscore ByteString
key Double
min Double
max = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"ZREMRANGEBYSCORE"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Double
min] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Double
max] )
hkeys
:: (RedisCtx m f)
=> ByteString
-> m (f [ByteString])
hkeys :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f [ByteString])
hkeys ByteString
key = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"HKEYS"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] )
slaveof
:: (RedisCtx m f)
=> ByteString
-> ByteString
-> m (f Status)
slaveof :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> ByteString -> m (f Status)
slaveof ByteString
host ByteString
port = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"SLAVEOF"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
host] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
port] )
rpushx
:: (RedisCtx m f)
=> ByteString
-> ByteString
-> m (f Integer)
rpushx :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> ByteString -> m (f Integer)
rpushx ByteString
key ByteString
value = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"RPUSHX"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
value] )
debugObject
:: (RedisCtx m f)
=> ByteString
-> m (f ByteString)
debugObject :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f ByteString)
debugObject ByteString
key = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"DEBUG",ByteString
"OBJECT"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] )
bgsave
:: (RedisCtx m f)
=> m (f Status)
bgsave :: forall (m :: * -> *) (f :: * -> *). RedisCtx m f => m (f Status)
bgsave = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"BGSAVE"] )
hlen
:: (RedisCtx m f)
=> ByteString
-> m (f Integer)
hlen :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f Integer)
hlen ByteString
key = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"HLEN"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] )
rpoplpush
:: (RedisCtx m f)
=> ByteString
-> ByteString
-> m (f (Maybe ByteString))
rpoplpush :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> ByteString -> m (f (Maybe ByteString))
rpoplpush ByteString
source ByteString
destination = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"RPOPLPUSH"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
source] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
destination] )
brpop
:: (RedisCtx m f)
=> [ByteString]
-> Integer
-> m (f (Maybe (ByteString,ByteString)))
brpop :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
[ByteString] -> Integer -> m (f (Maybe (ByteString, ByteString)))
brpop [ByteString]
key Integer
timeout = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"BRPOP"] forall a. [a] -> [a] -> [a]
++ forall a b. (a -> b) -> [a] -> [b]
map forall a. RedisArg a => a -> ByteString
encode [ByteString]
key forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
timeout] )
bgrewriteaof
:: (RedisCtx m f)
=> m (f Status)
bgrewriteaof :: forall (m :: * -> *) (f :: * -> *). RedisCtx m f => m (f Status)
bgrewriteaof = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"BGREWRITEAOF"] )
zincrby
:: (RedisCtx m f)
=> ByteString
-> Integer
-> ByteString
-> m (f Double)
zincrby :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> Integer -> ByteString -> m (f Double)
zincrby ByteString
key Integer
increment ByteString
member = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"ZINCRBY"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
increment] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
member] )
hgetall
:: (RedisCtx m f)
=> ByteString
-> m (f [(ByteString,ByteString)])
hgetall :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f [(ByteString, ByteString)])
hgetall ByteString
key = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"HGETALL"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] )
hmset
:: (RedisCtx m f)
=> ByteString
-> [(ByteString,ByteString)]
-> m (f Status)
hmset :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> [(ByteString, ByteString)] -> m (f Status)
hmset ByteString
key [(ByteString, ByteString)]
fieldValue = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"HMSET"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b]
concatMap (\(ByteString
x,ByteString
y) -> [forall a. RedisArg a => a -> ByteString
encode ByteString
x,forall a. RedisArg a => a -> ByteString
encode ByteString
y])[(ByteString, ByteString)]
fieldValue )
sinter
:: (RedisCtx m f)
=> [ByteString]
-> m (f [ByteString])
sinter :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
[ByteString] -> m (f [ByteString])
sinter [ByteString]
key = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"SINTER"] forall a. [a] -> [a] -> [a]
++ forall a b. (a -> b) -> [a] -> [b]
map forall a. RedisArg a => a -> ByteString
encode [ByteString]
key )
pfadd
:: (RedisCtx m f)
=> ByteString
-> [ByteString]
-> m (f Integer)
pfadd :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> [ByteString] -> m (f Integer)
pfadd ByteString
key [ByteString]
value = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"PFADD"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ forall a b. (a -> b) -> [a] -> [b]
map forall a. RedisArg a => a -> ByteString
encode [ByteString]
value )
zremrangebyrank
:: (RedisCtx m f)
=> ByteString
-> Integer
-> Integer
-> m (f Integer)
zremrangebyrank :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> Integer -> Integer -> m (f Integer)
zremrangebyrank ByteString
key Integer
start Integer
stop = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"ZREMRANGEBYRANK"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
start] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
stop] )
flushdb
:: (RedisCtx m f)
=> m (f Status)
flushdb :: forall (m :: * -> *) (f :: * -> *). RedisCtx m f => m (f Status)
flushdb = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"FLUSHDB"] )
sadd
:: (RedisCtx m f)
=> ByteString
-> [ByteString]
-> m (f Integer)
sadd :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> [ByteString] -> m (f Integer)
sadd ByteString
key [ByteString]
member = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"SADD"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ forall a b. (a -> b) -> [a] -> [b]
map forall a. RedisArg a => a -> ByteString
encode [ByteString]
member )
lindex
:: (RedisCtx m f)
=> ByteString
-> Integer
-> m (f (Maybe ByteString))
lindex :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> Integer -> m (f (Maybe ByteString))
lindex ByteString
key Integer
index = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"LINDEX"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
index] )
lpush
:: (RedisCtx m f)
=> ByteString
-> [ByteString]
-> m (f Integer)
lpush :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> [ByteString] -> m (f Integer)
lpush ByteString
key [ByteString]
value = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"LPUSH"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ forall a b. (a -> b) -> [a] -> [b]
map forall a. RedisArg a => a -> ByteString
encode [ByteString]
value )
hstrlen
:: (RedisCtx m f)
=> ByteString
-> ByteString
-> m (f Integer)
hstrlen :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> ByteString -> m (f Integer)
hstrlen ByteString
key ByteString
field = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"HSTRLEN"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
field] )
smove
:: (RedisCtx m f)
=> ByteString
-> ByteString
-> ByteString
-> m (f Bool)
smove :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> ByteString -> ByteString -> m (f Bool)
smove ByteString
source ByteString
destination ByteString
member = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"SMOVE"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
source] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
destination] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
member] )
zscore
:: (RedisCtx m f)
=> ByteString
-> ByteString
-> m (f (Maybe Double))
zscore :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> ByteString -> m (f (Maybe Double))
zscore ByteString
key ByteString
member = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"ZSCORE"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
member] )
configResetstat
:: (RedisCtx m f)
=> m (f Status)
configResetstat :: forall (m :: * -> *) (f :: * -> *). RedisCtx m f => m (f Status)
configResetstat = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"CONFIG",ByteString
"RESETSTAT"] )
pfcount
:: (RedisCtx m f)
=> [ByteString]
-> m (f Integer)
pfcount :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
[ByteString] -> m (f Integer)
pfcount [ByteString]
key = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"PFCOUNT"] forall a. [a] -> [a] -> [a]
++ forall a b. (a -> b) -> [a] -> [b]
map forall a. RedisArg a => a -> ByteString
encode [ByteString]
key )
hdel
:: (RedisCtx m f)
=> ByteString
-> [ByteString]
-> m (f Integer)
hdel :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> [ByteString] -> m (f Integer)
hdel ByteString
key [ByteString]
field = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"HDEL"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ forall a b. (a -> b) -> [a] -> [b]
map forall a. RedisArg a => a -> ByteString
encode [ByteString]
field )
incrbyfloat
:: (RedisCtx m f)
=> ByteString
-> Double
-> m (f Double)
incrbyfloat :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> Double -> m (f Double)
incrbyfloat ByteString
key Double
increment = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"INCRBYFLOAT"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Double
increment] )
setbit
:: (RedisCtx m f)
=> ByteString
-> Integer
-> ByteString
-> m (f Integer)
setbit :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> Integer -> ByteString -> m (f Integer)
setbit ByteString
key Integer
offset ByteString
value = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"SETBIT"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
offset] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
value] )
flushall
:: (RedisCtx m f)
=> m (f Status)
flushall :: forall (m :: * -> *) (f :: * -> *). RedisCtx m f => m (f Status)
flushall = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"FLUSHALL"] )
incrby
:: (RedisCtx m f)
=> ByteString
-> Integer
-> m (f Integer)
incrby :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> Integer -> m (f Integer)
incrby ByteString
key Integer
increment = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"INCRBY"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
increment] )
time
:: (RedisCtx m f)
=> m (f (Integer,Integer))
time :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
m (f (Integer, Integer))
time = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"TIME"] )
smembers
:: (RedisCtx m f)
=> ByteString
-> m (f [ByteString])
smembers :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f [ByteString])
smembers ByteString
key = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"SMEMBERS"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] )
zlexcount
:: (RedisCtx m f)
=> ByteString
-> ByteString
-> ByteString
-> m (f Integer)
zlexcount :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> ByteString -> ByteString -> m (f Integer)
zlexcount ByteString
key ByteString
min ByteString
max = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"ZLEXCOUNT"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
min] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
max] )
sunion
:: (RedisCtx m f)
=> [ByteString]
-> m (f [ByteString])
sunion :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
[ByteString] -> m (f [ByteString])
sunion [ByteString]
key = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"SUNION"] forall a. [a] -> [a] -> [a]
++ forall a b. (a -> b) -> [a] -> [b]
map forall a. RedisArg a => a -> ByteString
encode [ByteString]
key )
sinterstore
:: (RedisCtx m f)
=> ByteString
-> [ByteString]
-> m (f Integer)
sinterstore :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> [ByteString] -> m (f Integer)
sinterstore ByteString
destination [ByteString]
key = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"SINTERSTORE"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
destination] forall a. [a] -> [a] -> [a]
++ forall a b. (a -> b) -> [a] -> [b]
map forall a. RedisArg a => a -> ByteString
encode [ByteString]
key )
hvals
:: (RedisCtx m f)
=> ByteString
-> m (f [ByteString])
hvals :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f [ByteString])
hvals ByteString
key = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"HVALS"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] )
configSet
:: (RedisCtx m f)
=> ByteString
-> ByteString
-> m (f Status)
configSet :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> ByteString -> m (f Status)
configSet ByteString
parameter ByteString
value = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"CONFIG",ByteString
"SET"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
parameter] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
value] )
scriptFlush
:: (RedisCtx m f)
=> m (f Status)
scriptFlush :: forall (m :: * -> *) (f :: * -> *). RedisCtx m f => m (f Status)
scriptFlush = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"SCRIPT",ByteString
"FLUSH"] )
dbsize
:: (RedisCtx m f)
=> m (f Integer)
dbsize :: forall (m :: * -> *) (f :: * -> *). RedisCtx m f => m (f Integer)
dbsize = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"DBSIZE"] )
wait
:: (RedisCtx m f)
=> Integer
-> Integer
-> m (f Integer)
wait :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
Integer -> Integer -> m (f Integer)
wait Integer
numslaves Integer
timeout = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"WAIT"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
numslaves] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
timeout] )
lpop
:: (RedisCtx m f)
=> ByteString
-> m (f (Maybe ByteString))
lpop :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f (Maybe ByteString))
lpop ByteString
key = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"LPOP"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] )
clientPause
:: (RedisCtx m f)
=> Integer
-> m (f Status)
clientPause :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
Integer -> m (f Status)
clientPause Integer
timeout = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"CLIENT",ByteString
"PAUSE"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
timeout] )
expire
:: (RedisCtx m f)
=> ByteString
-> Integer
-> m (f Bool)
expire :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> Integer -> m (f Bool)
expire ByteString
key Integer
seconds = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"EXPIRE"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
seconds] )
mget
:: (RedisCtx m f)
=> [ByteString]
-> m (f [Maybe ByteString])
mget :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
[ByteString] -> m (f [Maybe ByteString])
mget [ByteString]
key = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"MGET"] forall a. [a] -> [a] -> [a]
++ forall a b. (a -> b) -> [a] -> [b]
map forall a. RedisArg a => a -> ByteString
encode [ByteString]
key )
bitpos
:: (RedisCtx m f)
=> ByteString
-> Integer
-> Integer
-> Integer
-> m (f Integer)
bitpos :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> Integer -> Integer -> Integer -> m (f Integer)
bitpos ByteString
key Integer
bit Integer
start Integer
end = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"BITPOS"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
bit] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
start] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
end] )
lastsave
:: (RedisCtx m f)
=> m (f Integer)
lastsave :: forall (m :: * -> *) (f :: * -> *). RedisCtx m f => m (f Integer)
lastsave = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"LASTSAVE"] )
pexpire
:: (RedisCtx m f)
=> ByteString
-> Integer
-> m (f Bool)
pexpire :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> Integer -> m (f Bool)
pexpire ByteString
key Integer
milliseconds = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"PEXPIRE"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
milliseconds] )
clientList
:: (RedisCtx m f)
=> m (f [ByteString])
clientList :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
m (f [ByteString])
clientList = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"CLIENT",ByteString
"LIST"] )
renamenx
:: (RedisCtx m f)
=> ByteString
-> ByteString
-> m (f Bool)
renamenx :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> ByteString -> m (f Bool)
renamenx ByteString
key ByteString
newkey = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"RENAMENX"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
newkey] )
pfmerge
:: (RedisCtx m f)
=> ByteString
-> [ByteString]
-> m (f ByteString)
pfmerge :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> [ByteString] -> m (f ByteString)
pfmerge ByteString
destkey [ByteString]
sourcekey = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"PFMERGE"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
destkey] forall a. [a] -> [a] -> [a]
++ forall a b. (a -> b) -> [a] -> [b]
map forall a. RedisArg a => a -> ByteString
encode [ByteString]
sourcekey )
lrem
:: (RedisCtx m f)
=> ByteString
-> Integer
-> ByteString
-> m (f Integer)
lrem :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> Integer -> ByteString -> m (f Integer)
lrem ByteString
key Integer
count ByteString
value = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"LREM"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
count] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
value] )
sdiff
:: (RedisCtx m f)
=> [ByteString]
-> m (f [ByteString])
sdiff :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
[ByteString] -> m (f [ByteString])
sdiff [ByteString]
key = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"SDIFF"] forall a. [a] -> [a] -> [a]
++ forall a b. (a -> b) -> [a] -> [b]
map forall a. RedisArg a => a -> ByteString
encode [ByteString]
key )
get
:: (RedisCtx m f)
=> ByteString
-> m (f (Maybe ByteString))
get :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f (Maybe ByteString))
get ByteString
key = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"GET"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] )
getrange
:: (RedisCtx m f)
=> ByteString
-> Integer
-> Integer
-> m (f ByteString)
getrange :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> Integer -> Integer -> m (f ByteString)
getrange ByteString
key Integer
start Integer
end = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"GETRANGE"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
start] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
end] )
sdiffstore
:: (RedisCtx m f)
=> ByteString
-> [ByteString]
-> m (f Integer)
sdiffstore :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> [ByteString] -> m (f Integer)
sdiffstore ByteString
destination [ByteString]
key = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"SDIFFSTORE"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
destination] forall a. [a] -> [a] -> [a]
++ forall a b. (a -> b) -> [a] -> [b]
map forall a. RedisArg a => a -> ByteString
encode [ByteString]
key )
zcount
:: (RedisCtx m f)
=> ByteString
-> Double
-> Double
-> m (f Integer)
zcount :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> Double -> Double -> m (f Integer)
zcount ByteString
key Double
min Double
max = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"ZCOUNT"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Double
min] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Double
max] )
scriptLoad
:: (RedisCtx m f)
=> ByteString
-> m (f ByteString)
scriptLoad :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f ByteString)
scriptLoad ByteString
script = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"SCRIPT",ByteString
"LOAD"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
script] )
getset
:: (RedisCtx m f)
=> ByteString
-> ByteString
-> m (f (Maybe ByteString))
getset :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> ByteString -> m (f (Maybe ByteString))
getset ByteString
key ByteString
value = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"GETSET"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
value] )
dump
:: (RedisCtx m f)
=> ByteString
-> m (f ByteString)
dump :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f ByteString)
dump ByteString
key = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"DUMP"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] )
keys
:: (RedisCtx m f)
=> ByteString
-> m (f [ByteString])
keys :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f [ByteString])
keys ByteString
pattern = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"KEYS"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
pattern] )
configGet
:: (RedisCtx m f)
=> ByteString
-> m (f [(ByteString,ByteString)])
configGet :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f [(ByteString, ByteString)])
configGet ByteString
parameter = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"CONFIG",ByteString
"GET"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
parameter] )
rpush
:: (RedisCtx m f)
=> ByteString
-> [ByteString]
-> m (f Integer)
rpush :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> [ByteString] -> m (f Integer)
rpush ByteString
key [ByteString]
value = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"RPUSH"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ forall a b. (a -> b) -> [a] -> [b]
map forall a. RedisArg a => a -> ByteString
encode [ByteString]
value )
randomkey
:: (RedisCtx m f)
=> m (f (Maybe ByteString))
randomkey :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
m (f (Maybe ByteString))
randomkey = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"RANDOMKEY"] )
hsetnx
:: (RedisCtx m f)
=> ByteString
-> ByteString
-> ByteString
-> m (f Bool)
hsetnx :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> ByteString -> ByteString -> m (f Bool)
hsetnx ByteString
key ByteString
field ByteString
value = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"HSETNX"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
field] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
value] )
mset
:: (RedisCtx m f)
=> [(ByteString,ByteString)]
-> m (f Status)
mset :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
[(ByteString, ByteString)] -> m (f Status)
mset [(ByteString, ByteString)]
keyValue = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"MSET"] forall a. [a] -> [a] -> [a]
++ forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b]
concatMap (\(ByteString
x,ByteString
y) -> [forall a. RedisArg a => a -> ByteString
encode ByteString
x,forall a. RedisArg a => a -> ByteString
encode ByteString
y])[(ByteString, ByteString)]
keyValue )
setex
:: (RedisCtx m f)
=> ByteString
-> Integer
-> ByteString
-> m (f Status)
setex :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> Integer -> ByteString -> m (f Status)
setex ByteString
key Integer
seconds ByteString
value = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"SETEX"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
seconds] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
value] )
psetex
:: (RedisCtx m f)
=> ByteString
-> Integer
-> ByteString
-> m (f Status)
psetex :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> Integer -> ByteString -> m (f Status)
psetex ByteString
key Integer
milliseconds ByteString
value = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"PSETEX"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
milliseconds] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
value] )
scard
:: (RedisCtx m f)
=> ByteString
-> m (f Integer)
scard :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f Integer)
scard ByteString
key = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"SCARD"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] )
scriptExists
:: (RedisCtx m f)
=> [ByteString]
-> m (f [Bool])
scriptExists :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
[ByteString] -> m (f [Bool])
scriptExists [ByteString]
script = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"SCRIPT",ByteString
"EXISTS"] forall a. [a] -> [a] -> [a]
++ forall a b. (a -> b) -> [a] -> [b]
map forall a. RedisArg a => a -> ByteString
encode [ByteString]
script )
sunionstore
:: (RedisCtx m f)
=> ByteString
-> [ByteString]
-> m (f Integer)
sunionstore :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> [ByteString] -> m (f Integer)
sunionstore ByteString
destination [ByteString]
key = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"SUNIONSTORE"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
destination] forall a. [a] -> [a] -> [a]
++ forall a b. (a -> b) -> [a] -> [b]
map forall a. RedisArg a => a -> ByteString
encode [ByteString]
key )
persist
:: (RedisCtx m f)
=> ByteString
-> m (f Bool)
persist :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f Bool)
persist ByteString
key = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"PERSIST"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] )
strlen
:: (RedisCtx m f)
=> ByteString
-> m (f Integer)
strlen :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f Integer)
strlen ByteString
key = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"STRLEN"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] )
lpushx
:: (RedisCtx m f)
=> ByteString
-> ByteString
-> m (f Integer)
lpushx :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> ByteString -> m (f Integer)
lpushx ByteString
key ByteString
value = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"LPUSHX"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
value] )
hset
:: (RedisCtx m f)
=> ByteString
-> ByteString
-> ByteString
-> m (f Integer)
hset :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> ByteString -> ByteString -> m (f Integer)
hset ByteString
key ByteString
field ByteString
value = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"HSET"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
field] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
value] )
brpoplpush
:: (RedisCtx m f)
=> ByteString
-> ByteString
-> Integer
-> m (f (Maybe ByteString))
brpoplpush :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> ByteString -> Integer -> m (f (Maybe ByteString))
brpoplpush ByteString
source ByteString
destination Integer
timeout = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"BRPOPLPUSH"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
source] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
destination] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
timeout] )
zrevrank
:: (RedisCtx m f)
=> ByteString
-> ByteString
-> m (f (Maybe Integer))
zrevrank :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> ByteString -> m (f (Maybe Integer))
zrevrank ByteString
key ByteString
member = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"ZREVRANK"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
member] )
scriptKill
:: (RedisCtx m f)
=> m (f Status)
scriptKill :: forall (m :: * -> *) (f :: * -> *). RedisCtx m f => m (f Status)
scriptKill = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"SCRIPT",ByteString
"KILL"] )
setrange
:: (RedisCtx m f)
=> ByteString
-> Integer
-> ByteString
-> m (f Integer)
setrange :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> Integer -> ByteString -> m (f Integer)
setrange ByteString
key Integer
offset ByteString
value = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"SETRANGE"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
offset] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
value] )
del
:: (RedisCtx m f)
=> [ByteString]
-> m (f Integer)
del :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
[ByteString] -> m (f Integer)
del [ByteString]
key = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"DEL"] forall a. [a] -> [a] -> [a]
++ forall a b. (a -> b) -> [a] -> [b]
map forall a. RedisArg a => a -> ByteString
encode [ByteString]
key )
hincrbyfloat
:: (RedisCtx m f)
=> ByteString
-> ByteString
-> Double
-> m (f Double)
hincrbyfloat :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> ByteString -> Double -> m (f Double)
hincrbyfloat ByteString
key ByteString
field Double
increment = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"HINCRBYFLOAT"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
field] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Double
increment] )
hincrby
:: (RedisCtx m f)
=> ByteString
-> ByteString
-> Integer
-> m (f Integer)
hincrby :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> ByteString -> Integer -> m (f Integer)
hincrby ByteString
key ByteString
field Integer
increment = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"HINCRBY"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
field] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
increment] )
zremrangebylex
:: (RedisCtx m f)
=> ByteString
-> ByteString
-> ByteString
-> m (f Integer)
zremrangebylex :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> ByteString -> ByteString -> m (f Integer)
zremrangebylex ByteString
key ByteString
min ByteString
max = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"ZREMRANGEBYLEX"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
min] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
max] )
rpop
:: (RedisCtx m f)
=> ByteString
-> m (f (Maybe ByteString))
rpop :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f (Maybe ByteString))
rpop ByteString
key = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"RPOP"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] )
rename
:: (RedisCtx m f)
=> ByteString
-> ByteString
-> m (f Status)
rename :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> ByteString -> m (f Status)
rename ByteString
key ByteString
newkey = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"RENAME"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
newkey] )
zrem
:: (RedisCtx m f)
=> ByteString
-> [ByteString]
-> m (f Integer)
zrem :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> [ByteString] -> m (f Integer)
zrem ByteString
key [ByteString]
member = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"ZREM"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ forall a b. (a -> b) -> [a] -> [b]
map forall a. RedisArg a => a -> ByteString
encode [ByteString]
member )
hexists
:: (RedisCtx m f)
=> ByteString
-> ByteString
-> m (f Bool)
hexists :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> ByteString -> m (f Bool)
hexists ByteString
key ByteString
field = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"HEXISTS"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
field] )
clientGetname
:: (RedisCtx m f)
=> m (f Status)
clientGetname :: forall (m :: * -> *) (f :: * -> *). RedisCtx m f => m (f Status)
clientGetname = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"CLIENT",ByteString
"GETNAME"] )
configRewrite
:: (RedisCtx m f)
=> m (f Status)
configRewrite :: forall (m :: * -> *) (f :: * -> *). RedisCtx m f => m (f Status)
configRewrite = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"CONFIG",ByteString
"REWRITE"] )
decr
:: (RedisCtx m f)
=> ByteString
-> m (f Integer)
decr :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f Integer)
decr ByteString
key = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"DECR"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] )
hmget
:: (RedisCtx m f)
=> ByteString
-> [ByteString]
-> m (f [Maybe ByteString])
hmget :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> [ByteString] -> m (f [Maybe ByteString])
hmget ByteString
key [ByteString]
field = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"HMGET"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ forall a b. (a -> b) -> [a] -> [b]
map forall a. RedisArg a => a -> ByteString
encode [ByteString]
field )
lrange
:: (RedisCtx m f)
=> ByteString
-> Integer
-> Integer
-> m (f [ByteString])
lrange :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> Integer -> Integer -> m (f [ByteString])
lrange ByteString
key Integer
start Integer
stop = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"LRANGE"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
start] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
stop] )
decrby
:: (RedisCtx m f)
=> ByteString
-> Integer
-> m (f Integer)
decrby :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> Integer -> m (f Integer)
decrby ByteString
key Integer
decrement = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"DECRBY"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
decrement] )
llen
:: (RedisCtx m f)
=> ByteString
-> m (f Integer)
llen :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f Integer)
llen ByteString
key = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"LLEN"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] )
append
:: (RedisCtx m f)
=> ByteString
-> ByteString
-> m (f Integer)
append :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> ByteString -> m (f Integer)
append ByteString
key ByteString
value = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"APPEND"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
value] )
incr
:: (RedisCtx m f)
=> ByteString
-> m (f Integer)
incr :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f Integer)
incr ByteString
key = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"INCR"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] )
hget
:: (RedisCtx m f)
=> ByteString
-> ByteString
-> m (f (Maybe ByteString))
hget :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> ByteString -> m (f (Maybe ByteString))
hget ByteString
key ByteString
field = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"HGET"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
field] )
pexpireat
:: (RedisCtx m f)
=> ByteString
-> Integer
-> m (f Bool)
pexpireat :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> Integer -> m (f Bool)
pexpireat ByteString
key Integer
millisecondsTimestamp = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"PEXPIREAT"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
millisecondsTimestamp] )
ltrim
:: (RedisCtx m f)
=> ByteString
-> Integer
-> Integer
-> m (f Status)
ltrim :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> Integer -> Integer -> m (f Status)
ltrim ByteString
key Integer
start Integer
stop = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"LTRIM"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
start] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
stop] )
zcard
:: (RedisCtx m f)
=> ByteString
-> m (f Integer)
zcard :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f Integer)
zcard ByteString
key = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"ZCARD"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] )
lset
:: (RedisCtx m f)
=> ByteString
-> Integer
-> ByteString
-> m (f Status)
lset :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> Integer -> ByteString -> m (f Status)
lset ByteString
key Integer
index ByteString
value = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"LSET"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
index] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
value] )
expireat
:: (RedisCtx m f)
=> ByteString
-> Integer
-> m (f Bool)
expireat :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> Integer -> m (f Bool)
expireat ByteString
key Integer
timestamp = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"EXPIREAT"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
timestamp] )
save
:: (RedisCtx m f)
=> m (f Status)
save :: forall (m :: * -> *) (f :: * -> *). RedisCtx m f => m (f Status)
save = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"SAVE"] )
move
:: (RedisCtx m f)
=> ByteString
-> Integer
-> m (f Bool)
move :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> Integer -> m (f Bool)
move ByteString
key Integer
db = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"MOVE"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
db] )
getbit
:: (RedisCtx m f)
=> ByteString
-> Integer
-> m (f Integer)
getbit :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> Integer -> m (f Integer)
getbit ByteString
key Integer
offset = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"GETBIT"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
offset] )
msetnx
:: (RedisCtx m f)
=> [(ByteString,ByteString)]
-> m (f Bool)
msetnx :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
[(ByteString, ByteString)] -> m (f Bool)
msetnx [(ByteString, ByteString)]
keyValue = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"MSETNX"] forall a. [a] -> [a] -> [a]
++ forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b]
concatMap (\(ByteString
x,ByteString
y) -> [forall a. RedisArg a => a -> ByteString
encode ByteString
x,forall a. RedisArg a => a -> ByteString
encode ByteString
y])[(ByteString, ByteString)]
keyValue )
commandInfo
:: (RedisCtx m f)
=> [ByteString]
-> m (f [ByteString])
commandInfo :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
[ByteString] -> m (f [ByteString])
commandInfo [ByteString]
commandName = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"COMMAND",ByteString
"INFO"] forall a. [a] -> [a] -> [a]
++ forall a b. (a -> b) -> [a] -> [b]
map forall a. RedisArg a => a -> ByteString
encode [ByteString]
commandName )
quit
:: (RedisCtx m f)
=> m (f Status)
quit :: forall (m :: * -> *) (f :: * -> *). RedisCtx m f => m (f Status)
quit = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"QUIT"] )
blpop
:: (RedisCtx m f)
=> [ByteString]
-> Integer
-> m (f (Maybe (ByteString,ByteString)))
blpop :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
[ByteString] -> Integer -> m (f (Maybe (ByteString, ByteString)))
blpop [ByteString]
key Integer
timeout = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"BLPOP"] forall a. [a] -> [a] -> [a]
++ forall a b. (a -> b) -> [a] -> [b]
map forall a. RedisArg a => a -> ByteString
encode [ByteString]
key forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode Integer
timeout] )
srem
:: (RedisCtx m f)
=> ByteString
-> [ByteString]
-> m (f Integer)
srem :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> [ByteString] -> m (f Integer)
srem ByteString
key [ByteString]
member = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"SREM"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ forall a b. (a -> b) -> [a] -> [b]
map forall a. RedisArg a => a -> ByteString
encode [ByteString]
member )
echo
:: (RedisCtx m f)
=> ByteString
-> m (f ByteString)
echo :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f ByteString)
echo ByteString
message = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"ECHO"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
message] )
sismember
:: (RedisCtx m f)
=> ByteString
-> ByteString
-> m (f Bool)
sismember :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> ByteString -> m (f Bool)
sismember ByteString
key ByteString
member = forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString
"SISMEMBER"] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
key] forall a. [a] -> [a] -> [a]
++ [forall a. RedisArg a => a -> ByteString
encode ByteString
member] )