{-# LANGUAGE OverloadedStrings, FlexibleContexts, OverloadedLists #-}
module Database.Redis.Commands (
auth,
authOpts,
AuthOpts(..),
defaultAuthOpts,
echo,
ping,
quit,
select,
copy,
copyOpts,
CopyOpts(..),
defaultCopyOpts,
del,
dump,
exists,
expire,
expireOpts,
ExpireOpts(..),
expireat,
expireatOpts,
keys,
MigrateOpts(..),
defaultMigrateOpts,
migrate,
migrateMultiple,
move,
objectRefcount,
objectEncoding,
objectIdletime,
persist,
expiretime,
pexpire,
pexpiretime,
pexpireat,
pexpireatOpts,
pttl,
randomkey,
rename,
renamenx,
restore,
restoreReplace,
Cursor,
cursor0,
ScanOpts(..),
defaultScanOpts,
scan,
scanOpts,
SortOpts(..),
defaultSortOpts,
SortOrder(..),
sort,
sortStore,
ttl,
RedisType(..),
getType,
hdel,
HashFieldExpirationStatus(..),
HashFieldExpirationInfo(..),
hexists,
hexpire,
hexpireOpts,
hexpireat,
hexpireatOpts,
hexpiretime,
hget,
hgetdel,
hgetex,
HGetExOpts(..),
defaultHGetExOpts,
hgetexOpts,
hgetall,
hincrby,
hincrbyfloat,
hkeys,
hlen,
hmget,
hmset,
hrandfield,
hrandfieldCount,
hrandfieldCountWithValues,
hscan,
hscanOpts,
hpexpire,
hpexpireOpts,
hpexpireat,
hpexpireatOpts,
hpexpiretime,
hpttl,
hset,
hsetex,
HSetExCondition(..),
HSetExOpts(..),
defaultHSetExOpts,
hsetexOpts,
hsetnx,
hstrlen,
httl,
hvals,
pfadd,
pfcount,
pfmerge,
blpop,
blpopFloat,
blmpop,
blmpopCount,
blmove,
ListDirection(..),
brpop,
brpopFloat,
brpoplpush,
lindex,
linsertBefore,
linsertAfter,
llen,
lmpop,
lmpopCount,
lpos,
LPosOpts(..),
defaultLPosOpts,
lposOpts,
lposCount,
lposCountOpts,
lpop,
lpopCount,
lmove,
lpush,
lpushx,
lrange,
lrem,
lset,
ltrim,
rpop,
rpopCount,
rpoplpush,
rpush,
rpushx,
eval,
evalsha,
fcall,
fcallReadonly,
DebugMode,
functionHelp,
functionList,
FunctionListOpts(..),
defaultFunctionListOpts,
functionListOpts,
module Function,
scriptDebug,
scriptExists,
scriptFlush,
scriptKill,
scriptLoad,
bgrewriteaof,
bgsave,
bgsaveSchedule,
clientGetname,
clientId,
clientList,
clientPause,
ReplyMode,
clientReply,
clientUnpause,
clientSetname,
clientNoTouch,
clientSetinfo,
commandCount,
commandInfo,
commandList,
CommandListFilter(..),
commandListOpts,
HotkeysMetric(..),
HotkeysStartOpts(..),
defaultHotkeysStartOpts,
HotkeysSlotRange(..),
HotkeysGetResponse(..),
hotkeysGet,
hotkeysStart,
hotkeysStartOpts,
hotkeysStop,
hotkeysReset,
configGet,
configResetstat,
configRewrite,
configSet,
dbsize,
debugObject,
flushall,
flushallOpts,
FlushOpts(..),
flushdb,
flushdbOpts,
info,
infoSection,
lastsave,
save,
slaveof,
Slowlog(..),
slowlogGet,
slowlogLen,
slowlogReset,
time,
sadd,
scard,
sdiff,
sdiffstore,
sinter,
sintercard,
SintercardOpts(..),
defaultSintercardOpts,
sintercardOpts,
sinterstore,
sismember,
smembers,
smismember,
smove,
spop,
spopN,
srandmember,
srandmemberN,
srem,
sscan,
sscanOpts,
sunion,
sunionstore,
bzpopmax,
bzpopmin,
ZaddOpts(..),
defaultZaddOpts,
zadd,
zaddOpts,
zcard,
zcount,
zdiff,
zdiffWithscores,
zdiffstore,
SizeCondition(..),
zincrby,
Aggregate(..),
ZPopMinMax(..),
ZPopResponse(..),
zmpop,
zmpopCount,
bzmpop,
bzmpopCount,
ZAggregateOpts(..),
defaultZAggregateOpts,
zinter,
zinterWithscores,
zinterOpts,
zinterWithscoresOpts,
zinterstore,
zinterstoreWeights,
zlexcount,
zmscore,
zpopmin,
zpopmax,
zrandmember,
zrandmemberN,
zrandmemberWithscores,
zrange,
zrangeWithscores,
ZRangeStoreRange(..),
ZRangeStoreOpts(..),
defaultZRangeStoreOpts,
zrangestore,
zrangestoreOpts,
RangeLex(..),
zrangebylex,
zrangebylexLimit,
zrangebyscore,
zrangebyscoreWithscores,
zrangebyscoreLimit,
zrangebyscoreWithscoresLimit,
zrank,
zrankWithScore,
zrem,
zremrangebylex,
zremrangebyrank,
zremrangebyscore,
zrevrange,
zrevrangeWithscores,
zrevrangebyscore,
zrevrangebyscoreWithscores,
zrevrangebyscoreLimit,
zrevrangebyscoreWithscoresLimit,
zrevrank,
zrevrankWithScore,
zscan,
zscanOpts,
zscore,
zunion,
zunionWithscores,
zunionOpts,
zunionWithscoresOpts,
zunionstore,
zunionstoreWeights,
VAddQuantization(..),
VAddOpts(..),
defaultVAddOpts,
VQuantization(..),
VEmbRawResponse(..),
VInfoResponse(..),
VLinksResponse(..),
VLinksWithScoresResponse(..),
VSimQuery(..),
VSimOpts(..),
defaultVSimOpts,
VSimWithAttribsResult(..),
VSimWithAttribsResponse(..),
vadd,
vaddOpts,
vcard,
vdim,
vemb,
vembRaw,
vgetattr,
vinfo,
vismember,
vlinks,
vlinksWithScores,
vrandmember,
vrandmemberCount,
vrange,
vrangeCount,
vrem,
vsetattr,
vsim,
vsimOpts,
vsimWithScores,
vsimWithScoresOpts,
vsimWithScoresWithAttribs,
vsimWithScoresWithAttribsOpts,
ARGrepPredicate(..),
ARGrepCombine(..),
ARGrepOpts(..),
defaultARGrepOpts,
ARLastItemsOpts(..),
defaultARLastItemsOpts,
ARScanOpts(..),
defaultARScanOpts,
ARIndexValuePairsResponse(..),
ARInfoResponse(..),
AROpValue(..),
AROpCount(..),
arcount,
ardel,
argetrange,
argrep,
argrepOpts,
argrepWithValues,
argrepWithValuesOpts,
arinfo,
arinfoFull,
arinsert,
arlastitems,
arlastitemsOpts,
arlen,
armget,
arnext,
aropValue,
aropCount,
arring,
arscan,
arscanOpts,
arseek,
arset,
append,
bitcount,
bitcountRange,
bitopAnd,
bitopOr,
bitopXor,
bitopNot,
bitpos,
bitposOpts,
BitposOpts(..),
BitposType(..),
decr,
decrby,
delex,
DelexCondition(..),
delexWhen,
digest,
get,
getbit,
getdel,
getex,
IncrexExpiration(..),
IncrexOpts(..),
defaultIncrexOpts,
increx,
increxOpts,
increxBy,
increxByFloat,
GetExOpts(..),
defaultGetExOpts,
getexOpts,
getrange,
getset,
incr,
incrby,
incrbyfloat,
mget,
mset,
msetex,
msetexOpts,
msetnx,
psetex,
Condition(..),
SetOpts(..),
defaultSetOpts,
set,
setOpts,
setGet,
setGetOpts,
setbit,
setex,
setnx,
setrange,
strlen,
substr,
XReadOpts(..),
defaultXreadOpts,
XReadResponse(..),
StreamsRecord(..),
xadd,
xaddOpts,
XAddOpts(..),
defaultXAddOpts,
TrimStrategy(..),
TrimType(..),
trimOpts,
xread,
xreadOpts,
xreadGroup,
XReadGroupOpts(..),
defaultXReadGroupOpts,
xreadGroupOpts,
xack,
xackdel,
xackdelOpts,
XRefPolicy(..),
XEntryDeletionOpts(..),
defaultXEntryDeletionOpts,
XEntryDeletionResult(..),
XCfgSetOpts(..),
defaultXCfgSetOpts,
xcfgset,
XNackMode(..),
XNackOpts(..),
defaultXNackOpts,
xidmprecord,
xnack,
xnackOpts,
xgroupCreate,
xgroupCreateOpts,
XGroupCreateOpts(..),
defaultXGroupCreateOpts,
xgroupCreateConsumer,
xgroupSetId,
xgroupSetIdOpts,
XGroupSetIdOpts(..),
defaultXGroupSetIdOpts,
xgroupDestroy,
xgroupDelConsumer,
xrange,
xrevRange,
xlen,
xpendingSummary,
XPendingSummaryResponse(..),
XPendingDetailOpts(..),
defaultXPendingDetailOpts,
XPendingDetailRecord(..),
xpendingDetail,
XClaimOpts(..),
defaultXClaimOpts,
xclaim,
xclaimJustIds,
xautoclaim,
xautoclaimOpts,
XAutoclaimOpts(..),
XAutoclaimStreamsResult,
XAutoclaimResult(..),
xautoclaimJustIds,
xautoclaimJustIdsOpts,
XAutoclaimJustIdsResult,
XInfoConsumersResponse(..),
xinfoConsumers,
XInfoGroupsResponse(..),
xinfoGroups,
XInfoStreamResponse(..),
xinfoStream,
xdel,
xdelex,
xdelexOpts,
xtrim,
GeoUnit(..),
GeoOrder(..),
GeoCoordinates(..),
GeoLocation(..),
GeoSearchFrom(..),
GeoSearchBy(..),
GeoSearchOpts(..),
defaultGeoSearchOpts,
GeoSearchStoreOpts(..),
defaultGeoSearchStoreOpts,
GeoAddOpts(..),
defaultGeoAddOpts,
geoadd,
geoaddOpts,
geodist,
geopos,
geoSearch,
geoSearchStore,
module Wait,
module BF,
module CF,
module Cms,
module Topk,
module Tdigest,
module Ts,
module FT,
module JSON,
inf,
ClusterInfoResponse (..),
ClusterInfoResponseState (..),
clusterInfo,
clusterMyshardid,
ClusterNodesResponse(..),
ClusterNodesResponseEntry(..),
ClusterNodesResponseSlotSpec(..),
clusterNodes,
ClusterSlotsResponse(..),
ClusterSlotsResponseEntry(..),
ClusterSlotsNode(..),
clusterSlots,
ClusterSlotStatsMetric(..),
ClusterSlotStatsOrderByOpts(..),
defaultClusterSlotStatsOrderByOpts,
ClusterSlotStatsQuery(..),
ClusterSlotStatsResponse(..),
ClusterSlotStatsResponseEntry(..),
clusterSlotStats,
clusterSlotStatsSlotsRange,
clusterSlotStatsOrderBy,
clusterSlotStatsOrderByOpts,
ClusterMigrationSlotRange(..),
ClusterMigrationTask(..),
ClusterMigrationStatusResponse(..),
clusterMigrationImport,
clusterMigrationCancelId,
clusterMigrationCancelAll,
clusterMigrationStatus,
clusterMigrationStatusAll,
clusterMigrationStatusId,
clusterSetSlotNode,
clusterSetSlotStable,
clusterSetSlotImporting,
clusterSetSlotMigrating,
clusterGetKeysInSlot,
command
) where
import Prelude hiding (min,max)
import Data.Int
import Data.ByteString (ByteString)
import Data.List.NonEmpty (NonEmpty(..))
import qualified Data.List.NonEmpty as NE
import Database.Redis.ManualCommands.BF as BF
import Database.Redis.ManualCommands.CF as CF
import Database.Redis.ManualCommands.Cms as Cms
import Database.Redis.ManualCommands.FT as FT
import Database.Redis.ManualCommands.Function as Function
import Database.Redis.ManualCommands.JSON as JSON
import Database.Redis.ManualCommands.Tdigest as Tdigest
import Database.Redis.ManualCommands.Ts as Ts
import Database.Redis.ManualCommands.Topk as Topk
import Database.Redis.ManualCommands.Wait as Wait
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 = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"TTL", ByteString -> ByteString
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 = [ByteString] -> m (f Bool)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"SETNX", ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
key, ByteString -> ByteString
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 = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"PTTL", ByteString -> ByteString
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 = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"COMMAND",Item [ByteString]
ByteString
"COUNT"]
clientSetname
:: (RedisCtx m f)
=> ByteString
-> m (f Status)
clientSetname :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f Status)
clientSetname ByteString
connectionName = [ByteString] -> m (f Status)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"CLIENT",Item [ByteString]
ByteString
"SETNAME",ByteString -> ByteString
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 = [ByteString] -> m (f (Maybe Integer))
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"ZRANK", ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
key, ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
member]
zrankWithScore
:: (RedisCtx m f)
=> ByteString
-> ByteString
-> m (f (Maybe (Integer,Double)))
zrankWithScore :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> ByteString -> m (f (Maybe (Integer, Double)))
zrankWithScore ByteString
key ByteString
member = [ByteString] -> m (f (Maybe (Integer, Double)))
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"ZRANK", ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
key, ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
member, Item [ByteString]
ByteString
"WITHSCORE"]
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 =
[ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"ZREMRANGEBYSCORE",ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
key,Double -> ByteString
forall a. RedisArg a => a -> ByteString
encode Double
min,Double -> ByteString
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 = [ByteString] -> m (f [ByteString])
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"HKEYS",ByteString -> ByteString
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 = [ByteString] -> m (f Status)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"SLAVEOF",ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
host,ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
port]
rpushx
:: (RedisCtx m f)
=> ByteString
-> NonEmpty ByteString
-> m (f Integer)
rpushx :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> NonEmpty ByteString -> m (f Integer)
rpushx ByteString
key (ByteString
value:|[ByteString]
values) = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest (ByteString
"RPUSHX"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
keyByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
valueByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:[ByteString]
values)
debugObject
:: (RedisCtx m f)
=> ByteString
-> m (f ByteString)
debugObject :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f ByteString)
debugObject ByteString
key = [ByteString] -> m (f ByteString)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"DEBUG",Item [ByteString]
ByteString
"OBJECT",ByteString -> ByteString
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 = [ByteString] -> m (f Status)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"BGSAVE"]
bgsaveSchedule
:: (RedisCtx m f)
=> m (f Status)
bgsaveSchedule :: forall (m :: * -> *) (f :: * -> *). RedisCtx m f => m (f Status)
bgsaveSchedule = [ByteString] -> m (f Status)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"BGSAVE", Item [ByteString]
ByteString
"SCHEDULE"]
hlen
:: (RedisCtx m f)
=> ByteString
-> m (f Integer)
hlen :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f Integer)
hlen ByteString
key = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"HLEN", Item [ByteString]
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 = [ByteString] -> m (f (Maybe ByteString))
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"RPOPLPUSH",ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
source,ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
destination]
brpop
:: (RedisCtx m f)
=> NonEmpty ByteString
-> Integer
-> m (f (Maybe (ByteString,ByteString)))
brpop :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
NonEmpty ByteString
-> Integer -> m (f (Maybe (ByteString, ByteString)))
brpop (ByteString
key:|[ByteString]
rest) Integer
timeout = [ByteString] -> m (f (Maybe (ByteString, ByteString)))
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ((ByteString
"BRPOP"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
keyByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:[ByteString]
rest) [ByteString] -> [ByteString] -> [ByteString]
forall a. [a] -> [a] -> [a]
++ [Integer -> ByteString
forall a. RedisArg a => a -> ByteString
encode Integer
timeout])
brpopFloat
:: (RedisCtx m f)
=> [ByteString]
-> Double
-> m (f (Maybe (ByteString,ByteString)))
brpopFloat :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
[ByteString] -> Double -> m (f (Maybe (ByteString, ByteString)))
brpopFloat [ByteString]
key Double
timeout = [ByteString] -> m (f (Maybe (ByteString, ByteString)))
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([Item [ByteString]
ByteString
"BRPOP"] [ByteString] -> [ByteString] -> [ByteString]
forall a. [a] -> [a] -> [a]
++ (ByteString -> ByteString) -> [ByteString] -> [ByteString]
forall a b. (a -> b) -> [a] -> [b]
map ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode [ByteString]
key [ByteString] -> [ByteString] -> [ByteString]
forall a. [a] -> [a] -> [a]
++ [Double -> ByteString
forall a. RedisArg a => a -> ByteString
encode Double
timeout])
bzpopmax
:: (RedisCtx m f)
=> NonEmpty ByteString
-> Double
-> m (f (Maybe (ByteString, ByteString, Double)))
bzpopmax :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
NonEmpty ByteString
-> Double -> m (f (Maybe (ByteString, ByteString, Double)))
bzpopmax (ByteString
key:|[ByteString]
keys_) Double
timeout = [ByteString] -> m (f (Maybe (ByteString, ByteString, Double)))
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString] -> m (f (Maybe (ByteString, ByteString, Double))))
-> [ByteString] -> m (f (Maybe (ByteString, ByteString, Double)))
forall a b. (a -> b) -> a -> b
$ ByteString
"BZPOPMAX" ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
: ByteString
key ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
: [ByteString]
keys_ [ByteString] -> [ByteString] -> [ByteString]
forall a. [a] -> [a] -> [a]
++ [Double -> ByteString
forall a. RedisArg a => a -> ByteString
encode Double
timeout]
bzpopmin
:: (RedisCtx m f)
=> NonEmpty ByteString
-> Double
-> m (f (Maybe (ByteString, ByteString, Double)))
bzpopmin :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
NonEmpty ByteString
-> Double -> m (f (Maybe (ByteString, ByteString, Double)))
bzpopmin (ByteString
key:|[ByteString]
keys_) Double
timeout = [ByteString] -> m (f (Maybe (ByteString, ByteString, Double)))
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([ByteString] -> m (f (Maybe (ByteString, ByteString, Double))))
-> [ByteString] -> m (f (Maybe (ByteString, ByteString, Double)))
forall a b. (a -> b) -> a -> b
$ ByteString
"BZPOPMIN" ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
: ByteString
key ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
: [ByteString]
keys_ [ByteString] -> [ByteString] -> [ByteString]
forall a. [a] -> [a] -> [a]
++ [Double -> ByteString
forall a. RedisArg a => a -> ByteString
encode Double
timeout]
bgrewriteaof
:: (RedisCtx m f)
=> m (f Status)
bgrewriteaof :: forall (m :: * -> *) (f :: * -> *). RedisCtx m f => m (f Status)
bgrewriteaof = [ByteString] -> m (f Status)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
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 = [ByteString] -> m (f Double)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"ZINCRBY",ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
key,Integer -> ByteString
forall a. RedisArg a => a -> ByteString
encode Integer
increment,ByteString -> ByteString
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 = [ByteString] -> m (f [(ByteString, ByteString)])
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"HGETALL", ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
key]
hmset
:: (RedisCtx m f)
=> ByteString
-> NonEmpty (ByteString,ByteString)
-> m (f Status)
hmset :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> NonEmpty (ByteString, ByteString) -> m (f Status)
hmset ByteString
key ((ByteString
field,ByteString
value):|[(ByteString, ByteString)]
fieldValues) =
[ByteString] -> m (f Status)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest (ByteString
"HMSET"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
keyByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
fieldByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
valueByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
: ((ByteString, ByteString) -> [ByteString])
-> [(ByteString, ByteString)] -> [ByteString]
forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b]
concatMap (\(ByteString
x,ByteString
y) -> [Item [ByteString]
ByteString
x,Item [ByteString]
ByteString
y]) [(ByteString, ByteString)]
fieldValues)
sinter
:: (RedisCtx m f)
=> NonEmpty ByteString
-> m (f [ByteString])
sinter :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
NonEmpty ByteString -> m (f [ByteString])
sinter (ByteString
key:|[ByteString]
keys_) = [ByteString] -> m (f [ByteString])
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest (ByteString
"SINTER"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
keyByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:[ByteString]
keys_)
pfadd
:: (RedisCtx m f)
=> ByteString
-> NonEmpty ByteString
-> m (f Integer)
pfadd :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> NonEmpty ByteString -> m (f Integer)
pfadd ByteString
key (ByteString
value:|[ByteString]
values) = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest (ByteString
"PFADD"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
keyByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
valueByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:[ByteString]
values)
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 =
[ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"ZREMRANGEBYRANK",ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
key,Integer -> ByteString
forall a. RedisArg a => a -> ByteString
encode Integer
start,Integer -> ByteString
forall a. RedisArg a => a -> ByteString
encode Integer
stop]
zpopmin
:: (RedisCtx m f)
=> ByteString
-> m (f (Maybe (ByteString, Double)))
zpopmin :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f (Maybe (ByteString, Double)))
zpopmin ByteString
key = [ByteString] -> m (f (Maybe (ByteString, Double)))
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"ZPOPMIN", Item [ByteString]
ByteString
key]
zpopmax
:: (RedisCtx m f)
=> ByteString
-> m (f (Maybe (ByteString, Double)))
zpopmax :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f (Maybe (ByteString, Double)))
zpopmax ByteString
key = [ByteString] -> m (f (Maybe (ByteString, Double)))
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"ZPOPMAX", Item [ByteString]
ByteString
key]
flushdb
:: (RedisCtx m f)
=> m (f Status)
flushdb :: forall (m :: * -> *) (f :: * -> *). RedisCtx m f => m (f Status)
flushdb = [ByteString] -> m (f Status)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"FLUSHDB"]
sadd
:: (RedisCtx m f)
=> ByteString
-> NonEmpty ByteString
-> m (f Integer)
sadd :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> NonEmpty ByteString -> m (f Integer)
sadd ByteString
key NonEmpty ByteString
member = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest (ByteString
"SADD"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
keyByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:NonEmpty ByteString -> [ByteString]
forall a. NonEmpty a -> [a]
NE.toList ((ByteString -> ByteString)
-> NonEmpty ByteString -> NonEmpty ByteString
forall a b. (a -> b) -> NonEmpty a -> NonEmpty b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode NonEmpty 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 = [ByteString] -> m (f (Maybe ByteString))
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"LINDEX",ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
key,Integer -> ByteString
forall a. RedisArg a => a -> ByteString
encode Integer
index]
lpush
:: (RedisCtx m f)
=> ByteString
-> NonEmpty ByteString
-> m (f Integer)
lpush :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> NonEmpty ByteString -> m (f Integer)
lpush ByteString
key (ByteString
value:|[ByteString]
values) = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest (ByteString
"LPUSH"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
keyByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
valueByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:[ByteString]
values)
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 = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"HSTRLEN", Item [ByteString]
ByteString
key, Item [ByteString]
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 =
[ByteString] -> m (f Bool)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"SMOVE", Item [ByteString]
ByteString
source, Item [ByteString]
ByteString
destination, Item [ByteString]
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 = [ByteString] -> m (f (Maybe Double))
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"ZSCORE",ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
key,ByteString -> ByteString
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 = [ByteString] -> m (f Status)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"CONFIG",Item [ByteString]
ByteString
"RESETSTAT"]
pfcount
:: (RedisCtx m f)
=> NonEmpty ByteString
-> m (f Integer)
pfcount :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
NonEmpty ByteString -> m (f Integer)
pfcount (ByteString
key:|[ByteString]
keys_) = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest (ByteString
"PFCOUNT"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
: ByteString
keyByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
: [ByteString]
keys_)
hdel
:: (RedisCtx m f)
=> ByteString
-> NonEmpty ByteString
-> m (f Integer)
hdel :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> NonEmpty ByteString -> m (f Integer)
hdel ByteString
key (ByteString
field:|[ByteString]
fields) = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest (ByteString
"HDEL"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
keyByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
fieldByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:[ByteString]
fields)
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 = [ByteString] -> m (f Double)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"INCRBYFLOAT", Item [ByteString]
ByteString
key, Double -> ByteString
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 = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"SETBIT", Item [ByteString]
ByteString
key, Integer -> ByteString
forall a. RedisArg a => a -> ByteString
encode Integer
offset, Item [ByteString]
ByteString
value]
flushall
:: (RedisCtx m f)
=> m (f Status)
flushall :: forall (m :: * -> *) (f :: * -> *). RedisCtx m f => m (f Status)
flushall = [ByteString] -> m (f Status)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
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 = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"INCRBY", Item [ByteString]
ByteString
key, Integer -> ByteString
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 = [ByteString] -> m (f (Integer, Integer))
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"TIME"]
smembers
:: (RedisCtx m f)
=> ByteString
-> m (f [ByteString])
smembers :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f [ByteString])
smembers ByteString
key = [ByteString] -> m (f [ByteString])
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"SMEMBERS", Item [ByteString]
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 = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"ZLEXCOUNT", Item [ByteString]
ByteString
key, Item [ByteString]
ByteString
min, Item [ByteString]
ByteString
max]
sunion
:: (RedisCtx m f)
=> NonEmpty ByteString
-> m (f [ByteString])
sunion :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
NonEmpty ByteString -> m (f [ByteString])
sunion (ByteString
key:|[ByteString]
keys_) = [ByteString] -> m (f [ByteString])
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest (ByteString
"SUNION"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
keyByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:[ByteString]
keys_)
sinterstore
:: (RedisCtx m f)
=> ByteString
-> NonEmpty ByteString
-> m (f Integer)
sinterstore :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> NonEmpty ByteString -> m (f Integer)
sinterstore ByteString
destination (ByteString
key:|[ByteString]
keys_) =
[ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest (ByteString
"SINTERSTORE"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
destinationByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
keyByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:[ByteString]
keys_)
hvals
:: (RedisCtx m f)
=> ByteString
-> m (f [ByteString])
hvals :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f [ByteString])
hvals ByteString
key = [ByteString] -> m (f [ByteString])
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"HVALS", Item [ByteString]
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 = [ByteString] -> m (f Status)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"CONFIG",Item [ByteString]
ByteString
"SET", Item [ByteString]
ByteString
parameter, Item [ByteString]
ByteString
value]
scriptFlush
:: (RedisCtx m f)
=> m (f Status)
scriptFlush :: forall (m :: * -> *) (f :: * -> *). RedisCtx m f => m (f Status)
scriptFlush = [ByteString] -> m (f Status)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"SCRIPT",Item [ByteString]
ByteString
"FLUSH"]
dbsize
:: (RedisCtx m f)
=> m (f Integer)
dbsize :: forall (m :: * -> *) (f :: * -> *). RedisCtx m f => m (f Integer)
dbsize = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"DBSIZE"]
lpop
:: (RedisCtx m f)
=> ByteString
-> m (f (Maybe ByteString))
lpop :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f (Maybe ByteString))
lpop ByteString
key = [ByteString] -> m (f (Maybe ByteString))
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"LPOP", ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
key]
lpopCount
:: (RedisCtx m f)
=> ByteString
-> Integer
-> m (f [ByteString])
lpopCount :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> Integer -> m (f [ByteString])
lpopCount ByteString
key Integer
count = [ByteString] -> m (f [ByteString])
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"LPOP", Item [ByteString]
ByteString
key, Integer -> ByteString
forall a. RedisArg a => a -> ByteString
encode Integer
count]
clientPause
:: (RedisCtx m f)
=> Integer
-> m (f Status)
clientPause :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
Integer -> m (f Status)
clientPause Integer
timeout = [ByteString] -> m (f Status)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"CLIENT",Item [ByteString]
ByteString
"PAUSE", Integer -> ByteString
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 = [ByteString] -> m (f Bool)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"EXPIRE", Item [ByteString]
ByteString
key, Integer -> ByteString
forall a. RedisArg a => a -> ByteString
encode Integer
seconds]
mget
:: (RedisCtx m f)
=> NonEmpty ByteString
-> m (f [Maybe ByteString])
mget :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
NonEmpty ByteString -> m (f [Maybe ByteString])
mget (ByteString
key:|[ByteString]
keys_) = [ByteString] -> m (f [Maybe ByteString])
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest (ByteString
"MGET"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
keyByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:[ByteString]
keys_)
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 = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"BITPOS", Item [ByteString]
ByteString
key, Integer -> ByteString
forall a. RedisArg a => a -> ByteString
encode Integer
bit, Integer -> ByteString
forall a. RedisArg a => a -> ByteString
encode Integer
start, Integer -> ByteString
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 = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([Item [ByteString]
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 = [ByteString] -> m (f Bool)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"PEXPIRE", Item [ByteString]
ByteString
key, Integer -> ByteString
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 = [ByteString] -> m (f [ByteString])
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([Item [ByteString]
ByteString
"CLIENT",Item [ByteString]
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 = [ByteString] -> m (f Bool)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"RENAMENX", Item [ByteString]
ByteString
key, Item [ByteString]
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 = [ByteString] -> m (f ByteString)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest (ByteString
"PFMERGE"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
: ByteString
destkeyByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
: [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 = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"LREM", Item [ByteString]
ByteString
key, Integer -> ByteString
forall a. RedisArg a => a -> ByteString
encode Integer
count, Item [ByteString]
ByteString
value]
sdiff
:: (RedisCtx m f)
=> NonEmpty ByteString
-> m (f [ByteString])
sdiff :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
NonEmpty ByteString -> m (f [ByteString])
sdiff (ByteString
key_:|[ByteString]
keys_) = [ByteString] -> m (f [ByteString])
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest (ByteString
"SDIFF"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
key_ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:[ByteString]
keys_)
get
:: (RedisCtx m f)
=> ByteString
-> m (f (Maybe ByteString))
get :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f (Maybe ByteString))
get ByteString
key = [ByteString] -> m (f (Maybe ByteString))
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([Item [ByteString]
ByteString
"GET"] [ByteString] -> [ByteString] -> [ByteString]
forall a. [a] -> [a] -> [a]
++ [ByteString -> ByteString
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 = [ByteString] -> m (f ByteString)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"GETRANGE", Item [ByteString]
ByteString
key, Integer -> ByteString
forall a. RedisArg a => a -> ByteString
encode Integer
start, Integer -> ByteString
forall a. RedisArg a => a -> ByteString
encode Integer
end]
sdiffstore
:: (RedisCtx m f)
=> ByteString
-> NonEmpty ByteString
-> m (f Integer)
sdiffstore :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> NonEmpty ByteString -> m (f Integer)
sdiffstore ByteString
destination (ByteString
key_:|[ByteString]
keys_) = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest (ByteString
"SDIFFSTORE"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
: ByteString
destinationByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
: ByteString
key_ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
: [ByteString]
keys_)
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 = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"ZCOUNT", Item [ByteString]
ByteString
key, Double -> ByteString
forall a. RedisArg a => a -> ByteString
encode Double
min, Double -> ByteString
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 = [ByteString] -> m (f ByteString)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"SCRIPT",Item [ByteString]
ByteString
"LOAD", ByteString -> ByteString
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 = [ByteString] -> m (f (Maybe ByteString))
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"GETSET", Item [ByteString]
ByteString
key, Item [ByteString]
ByteString
value]
dump
:: (RedisCtx m f)
=> ByteString
-> m (f ByteString)
dump :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f ByteString)
dump ByteString
key = [ByteString] -> m (f ByteString)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"DUMP", Item [ByteString]
ByteString
key]
keys
:: (RedisCtx m f)
=> ByteString
-> m (f [ByteString])
keys :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f [ByteString])
keys ByteString
pattern = [ByteString] -> m (f [ByteString])
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"KEYS", Item [ByteString]
ByteString
pattern]
configGet
:: (RedisCtx m f)
=> NonEmpty ByteString
-> m (f [(ByteString,ByteString)])
configGet :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
NonEmpty ByteString -> m (f [(ByteString, ByteString)])
configGet (ByteString
parameter:|[ByteString]
parameters) = [ByteString] -> m (f [(ByteString, ByteString)])
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest (ByteString
"CONFIG"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
"GET"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
parameterByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:[ByteString]
parameters)
rpush
:: (RedisCtx m f)
=> ByteString
-> NonEmpty ByteString
-> m (f Integer)
rpush :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> NonEmpty ByteString -> m (f Integer)
rpush ByteString
key (ByteString
value:|[ByteString]
values) = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest (ByteString
"RPUSH"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
: ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
keyByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
valueByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:[ByteString]
values)
randomkey
:: (RedisCtx m f)
=> m (f (Maybe ByteString))
randomkey :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
m (f (Maybe ByteString))
randomkey = [ByteString] -> m (f (Maybe ByteString))
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
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 = [ByteString] -> m (f Bool)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"HSETNX", Item [ByteString]
ByteString
key, Item [ByteString]
ByteString
field, Item [ByteString]
ByteString
value]
mset
:: (RedisCtx m f)
=> NonEmpty (ByteString,ByteString)
-> m (f Status)
mset :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
NonEmpty (ByteString, ByteString) -> m (f Status)
mset ((ByteString
key_,ByteString
value):|[(ByteString, ByteString)]
keyValue) =
[ByteString] -> m (f Status)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest (ByteString
"MSET"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
key_ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
valueByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
: ((ByteString, ByteString) -> [ByteString])
-> [(ByteString, ByteString)] -> [ByteString]
forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b]
concatMap (\(ByteString
x,ByteString
y) -> [ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
x,ByteString -> ByteString
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 = [ByteString] -> m (f Status)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"SETEX", Item [ByteString]
ByteString
key, Integer -> ByteString
forall a. RedisArg a => a -> ByteString
encode Integer
seconds, Item [ByteString]
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 = [ByteString] -> m (f Status)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"PSETEX", Item [ByteString]
ByteString
key, Integer -> ByteString
forall a. RedisArg a => a -> ByteString
encode Integer
milliseconds, Item [ByteString]
ByteString
value]
scard
:: (RedisCtx m f)
=> ByteString
-> m (f Integer)
scard :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f Integer)
scard ByteString
key = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"SCARD", Item [ByteString]
ByteString
key]
scriptExists
:: (RedisCtx m f)
=> NonEmpty ByteString
-> m (f [Bool])
scriptExists :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
NonEmpty ByteString -> m (f [Bool])
scriptExists (ByteString
script:|[ByteString]
scripts) = [ByteString] -> m (f [Bool])
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest (ByteString
"SCRIPT"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
"EXISTS"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
scriptByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:[ByteString]
scripts)
sunionstore
:: (RedisCtx m f)
=> ByteString
-> NonEmpty ByteString
-> m (f Integer)
sunionstore :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> NonEmpty ByteString -> m (f Integer)
sunionstore ByteString
destination (ByteString
key_:|[ByteString]
keys_) =
[ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest (ByteString
"SUNIONSTORE"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
destinationByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
key_ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:[ByteString]
keys_)
persist
:: (RedisCtx m f)
=> ByteString
-> m (f Bool)
persist :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f Bool)
persist ByteString
key = [ByteString] -> m (f Bool)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"PERSIST", Item [ByteString]
ByteString
key]
strlen
:: (RedisCtx m f)
=> ByteString
-> m (f Integer)
strlen :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f Integer)
strlen ByteString
key = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"STRLEN", ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
key]
lpushx
:: (RedisCtx m f)
=> ByteString
-> NonEmpty ByteString
-> m (f Integer)
lpushx :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> NonEmpty ByteString -> m (f Integer)
lpushx ByteString
key (ByteString
value:|[ByteString]
values) = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest (ByteString
"LPUSHX"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
keyByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
valueByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:[ByteString]
values)
hset
:: (RedisCtx m f)
=> ByteString
-> NonEmpty (ByteString, ByteString)
-> m (f Integer)
hset :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> NonEmpty (ByteString, ByteString) -> m (f Integer)
hset ByteString
key ((ByteString
field,ByteString
value):|[(ByteString, ByteString)]
fieldValues) =
[ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest (ByteString
"HSET"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
keyByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
fieldByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
valueByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:((ByteString, ByteString) -> [ByteString])
-> [(ByteString, ByteString)] -> [ByteString]
forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b]
concatMap (\(ByteString
f,ByteString
v) ->[Item [ByteString]
ByteString
f,Item [ByteString]
ByteString
v]) [(ByteString, ByteString)]
fieldValues)
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 =
[ByteString] -> m (f (Maybe ByteString))
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"BRPOPLPUSH", Item [ByteString]
ByteString
source, Item [ByteString]
ByteString
destination, Integer -> ByteString
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 = [ByteString] -> m (f (Maybe Integer))
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"ZREVRANK", Item [ByteString]
ByteString
key, Item [ByteString]
ByteString
member]
zrevrankWithScore
:: (RedisCtx m f)
=> ByteString
-> ByteString
-> m (f (Maybe (Integer, Double)))
zrevrankWithScore :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> ByteString -> m (f (Maybe (Integer, Double)))
zrevrankWithScore ByteString
key ByteString
member = [ByteString] -> m (f (Maybe (Integer, Double)))
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"ZREVRANK", Item [ByteString]
ByteString
key, Item [ByteString]
ByteString
member]
scriptKill
:: (RedisCtx m f)
=> m (f Status)
scriptKill :: forall (m :: * -> *) (f :: * -> *). RedisCtx m f => m (f Status)
scriptKill = [ByteString] -> m (f Status)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"SCRIPT",Item [ByteString]
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 = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"SETRANGE", Item [ByteString]
ByteString
key, Integer -> ByteString
forall a. RedisArg a => a -> ByteString
encode Integer
offset, Item [ByteString]
ByteString
value]
del
:: (RedisCtx m f)
=> NonEmpty ByteString
-> m (f Integer)
del :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
NonEmpty ByteString -> m (f Integer)
del (ByteString
key:|[ByteString]
rest) = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest (ByteString
"DEL"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
keyByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:[ByteString]
rest)
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 = [ByteString] -> m (f Double)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"HINCRBYFLOAT", Item [ByteString]
ByteString
key, Item [ByteString]
ByteString
field, Double -> ByteString
forall a. RedisArg a => a -> ByteString
encode Double
increment]
hincrby
:: (RedisCtx m f)
=> ByteString
-> ByteString
-> Int64
-> m (f Int64)
hincrby :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> ByteString -> Int64 -> m (f Int64)
hincrby ByteString
key ByteString
field Int64
increment = [ByteString] -> m (f Int64)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"HINCRBY", ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
key, ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
field, Int64 -> ByteString
forall a. RedisArg a => a -> ByteString
encode Int64
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 = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([Item [ByteString]
ByteString
"ZREMRANGEBYLEX"] [ByteString] -> [ByteString] -> [ByteString]
forall a. [a] -> [a] -> [a]
++ [ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
key] [ByteString] -> [ByteString] -> [ByteString]
forall a. [a] -> [a] -> [a]
++ [ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
min] [ByteString] -> [ByteString] -> [ByteString]
forall a. [a] -> [a] -> [a]
++ [ByteString -> ByteString
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 = [ByteString] -> m (f (Maybe ByteString))
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"RPOP", ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
key]
rpopCount
:: (RedisCtx m f)
=> ByteString
-> Integer
-> m (f [ByteString])
rpopCount :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> Integer -> m (f [ByteString])
rpopCount ByteString
key Integer
count = [ByteString] -> m (f [ByteString])
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest ([Item [ByteString]
ByteString
"RPOP",Item [ByteString]
ByteString
key, Integer -> ByteString
forall a. RedisArg a => a -> ByteString
encode Integer
count] )
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 = [ByteString] -> m (f Status)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"RENAME", ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
key, ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
newkey]
zrem
:: (RedisCtx m f)
=> ByteString
-> NonEmpty ByteString
-> m (f Integer)
zrem :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> NonEmpty ByteString -> m (f Integer)
zrem ByteString
key (ByteString
member:|[ByteString]
members) = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest (ByteString
"ZREM"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
keyByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
memberByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:[ByteString]
members)
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 = [ByteString] -> m (f Bool)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"HEXISTS", Item [ByteString]
ByteString
key, Item [ByteString]
ByteString
field]
clientId
:: (RedisCtx m f)
=> m (f Integer)
clientId :: forall (m :: * -> *) (f :: * -> *). RedisCtx m f => m (f Integer)
clientId = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"CLIENT",Item [ByteString]
ByteString
"ID"]
clientGetname
:: (RedisCtx m f)
=> m (f (Maybe ByteString))
clientGetname :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
m (f (Maybe ByteString))
clientGetname = [ByteString] -> m (f (Maybe ByteString))
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"CLIENT",Item [ByteString]
ByteString
"GETNAME"]
configRewrite
:: (RedisCtx m f)
=> m (f Status)
configRewrite :: forall (m :: * -> *) (f :: * -> *). RedisCtx m f => m (f Status)
configRewrite = [ByteString] -> m (f Status)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"CONFIG",Item [ByteString]
ByteString
"REWRITE"]
decr
:: (RedisCtx m f)
=> ByteString
-> m (f Integer)
decr :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f Integer)
decr ByteString
key = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"DECR", Item [ByteString]
ByteString
key]
hmget
:: (RedisCtx m f)
=> ByteString
-> NonEmpty ByteString
-> m (f [Maybe ByteString])
hmget :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> NonEmpty ByteString -> m (f [Maybe ByteString])
hmget ByteString
key (ByteString
field:|[ByteString]
fields) = [ByteString] -> m (f [Maybe ByteString])
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest (ByteString
"HMGET"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
keyByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
fieldByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:[ByteString]
fields)
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 = [ByteString] -> m (f [ByteString])
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"LRANGE", Item [ByteString]
ByteString
key, Integer -> ByteString
forall a. RedisArg a => a -> ByteString
encode Integer
start, Integer -> ByteString
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 = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"DECRBY",Item [ByteString]
ByteString
key, Integer -> ByteString
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 = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"LLEN", ByteString -> ByteString
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 = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"APPEND", Item [ByteString]
ByteString
key, Item [ByteString]
ByteString
value]
incr
:: (RedisCtx m f)
=> ByteString
-> m (f Integer)
incr :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f Integer)
incr ByteString
key = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"INCR", Item [ByteString]
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 = [ByteString] -> m (f (Maybe ByteString))
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"HGET",Item [ByteString]
ByteString
key,Item [ByteString]
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 = [ByteString] -> m (f Bool)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"PEXPIREAT", Item [ByteString]
ByteString
key, Integer -> ByteString
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 = [ByteString] -> m (f Status)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"LTRIM", Item [ByteString]
ByteString
key, Integer -> ByteString
forall a. RedisArg a => a -> ByteString
encode Integer
start, Integer -> ByteString
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 = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"ZCARD", Item [ByteString]
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 = [ByteString] -> m (f Status)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"LSET", Item [ByteString]
ByteString
key, Integer -> ByteString
forall a. RedisArg a => a -> ByteString
encode Integer
index, Item [ByteString]
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 = [ByteString] -> m (f Bool)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"EXPIREAT", Item [ByteString]
ByteString
key, Integer -> ByteString
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 = [ByteString] -> m (f Status)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
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 = [ByteString] -> m (f Bool)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"MOVE", Item [ByteString]
ByteString
key, Integer -> ByteString
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 = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"GETBIT", Item [ByteString]
ByteString
key, Integer -> ByteString
forall a. RedisArg a => a -> ByteString
encode Integer
offset]
msetnx
:: (RedisCtx m f)
=> NonEmpty (ByteString,ByteString)
-> m (f Bool)
msetnx :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
NonEmpty (ByteString, ByteString) -> m (f Bool)
msetnx ((ByteString
key,ByteString
value):|[(ByteString, ByteString)]
keysValues) =
[ByteString] -> m (f Bool)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest (ByteString
"MSETNX"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
keyByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
valueByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:((ByteString, ByteString) -> [ByteString])
-> [(ByteString, ByteString)] -> [ByteString]
forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b]
concatMap (\(ByteString
x,ByteString
y) -> [ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
x,ByteString -> ByteString
forall a. RedisArg a => a -> ByteString
encode ByteString
y]) [(ByteString, ByteString)]
keysValues)
commandInfo
:: (RedisCtx m f)
=> [ByteString]
-> m (f [ByteString])
commandInfo :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
[ByteString] -> m (f [ByteString])
commandInfo [ByteString]
commandName = [ByteString] -> m (f [ByteString])
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest (ByteString
"COMMAND"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
"INFO"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:(ByteString -> ByteString) -> [ByteString] -> [ByteString]
forall a b. (a -> b) -> [a] -> [b]
map ByteString -> ByteString
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 = [ByteString] -> m (f Status)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
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]
keys_ Integer
timeout = [ByteString] -> m (f (Maybe (ByteString, ByteString)))
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest (ByteString
"BLPOP"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:[ByteString]
keys_ [ByteString] -> [ByteString] -> [ByteString]
forall a. [a] -> [a] -> [a]
++ [Integer -> ByteString
forall a. RedisArg a => a -> ByteString
encode Integer
timeout] )
blpopFloat
:: (RedisCtx m f)
=> [ByteString]
-> Integer
-> m (f (Maybe (ByteString,ByteString)))
blpopFloat :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
[ByteString] -> Integer -> m (f (Maybe (ByteString, ByteString)))
blpopFloat [ByteString]
keys_ Integer
timeout = [ByteString] -> m (f (Maybe (ByteString, ByteString)))
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest (ByteString
"BLPOP"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:[ByteString]
keys_ [ByteString] -> [ByteString] -> [ByteString]
forall a. [a] -> [a] -> [a]
++ [Integer -> ByteString
forall a. RedisArg a => a -> ByteString
encode Integer
timeout] )
srem
:: (RedisCtx m f)
=> ByteString
-> NonEmpty ByteString
-> m (f Integer)
srem :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> NonEmpty ByteString -> m (f Integer)
srem ByteString
key (ByteString
member:|[ByteString]
members) = [ByteString] -> m (f Integer)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest (ByteString
"SREM"ByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
keyByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:ByteString
memberByteString -> [ByteString] -> [ByteString]
forall a. a -> [a] -> [a]
:[ByteString]
members)
echo
:: (RedisCtx m f)
=> ByteString
-> m (f ByteString)
echo :: forall (m :: * -> *) (f :: * -> *).
RedisCtx m f =>
ByteString -> m (f ByteString)
echo ByteString
message = [ByteString] -> m (f ByteString)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"ECHO", ByteString -> ByteString
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 = [ByteString] -> m (f Bool)
forall (m :: * -> *) (f :: * -> *) a.
(RedisCtx m f, RedisResult a) =>
[ByteString] -> m (f a)
sendRequest [Item [ByteString]
ByteString
"SISMEMBER",Item [ByteString]
ByteString
key, Item [ByteString]
ByteString
member]