| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Database.Redis.Sentinel
Description
Database.Redis like interface with connection through Redis Sentinel.
More details here: https://redis.io/topics/sentinel.
Example:
conn <-connectSentinelConnectionInfo(("localhost", 26379) :| []) "mymaster"defaultConnectInforunRedisconn $ doset"hello" "world"
When connection is opened, the Sentinels will be queried to get current master. Subsequent runRedis
calls will talk to that master.
If runRedis call fails, the next call will choose a new master to talk to.
This implementation is based on Gist by Emanuel Borsboom at https://gist.github.com/borsboom/681d37d273d5c4168723
Synopsis
- data SentinelConnectInfo = SentinelConnectInfo {}
- data SentinelConnection
- connect :: SentinelConnectInfo -> IO SentinelConnection
- runRedis :: SentinelConnection -> Redis (Either Reply a) -> IO (Either Reply a)
- data RedisSentinelException = NoSentinels (NonEmpty (HostName, PortNumber))
- time :: RedisCtx m f => m (f (Integer, Integer))
- data RedisType
- class RedisResult a where
- class RedisArg a where
- encode :: a -> ByteString
- data Reply
- = SingleLine ByteString
- | Error ByteString
- | Integer Integer
- | Bulk (Maybe ByteString)
- | MultiBulk (Maybe [Reply])
- data SortOpts = SortOpts {}
- get :: RedisCtx m f => ByteString -> m (f (Maybe ByteString))
- data ClusterInfoResponseState
- data Aggregate
- sort :: RedisCtx m f => ByteString -> SortOpts -> m (f [ByteString])
- migrate :: RedisCtx m f => ByteString -> ByteString -> ByteString -> Integer -> Integer -> m (f Status)
- append :: RedisCtx m f => ByteString -> ByteString -> m (f Integer)
- copy :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
- bitcount :: RedisCtx m f => ByteString -> m (f Integer)
- keys :: RedisCtx m f => ByteString -> m (f [ByteString])
- auth :: RedisCtx m f => ByteString -> m (f Status)
- defaultHooks :: Hooks
- data Status
- = Ok
- | Pong
- | Status ByteString
- select :: RedisCtx m f => Integer -> m (f Status)
- save :: RedisCtx m f => m (f Status)
- data Message
- scan :: RedisCtx m f => Cursor -> m (f (Cursor, [ByteString]))
- wait :: RedisCtx m f => Integer -> Integer -> m (f Integer)
- data XReadResponse = XReadResponse {
- stream :: ByteString
- records :: [StreamsRecord]
- data Hooks = Hooks {}
- rename :: RedisCtx m f => ByteString -> ByteString -> m (f Status)
- move :: RedisCtx m f => ByteString -> Integer -> m (f Bool)
- set :: RedisCtx m f => ByteString -> ByteString -> m (f Status)
- data ConnectInfo = ConnInfo {
- connectAddr :: !ConnectAddr
- connectAuth :: !(Maybe ByteString)
- connectUsername :: !(Maybe ByteString)
- connectDatabase :: !Integer
- connectMaxConnections :: !Int
- connectNumStripes :: !(Maybe Int)
- connectMaxIdleTime :: !NominalDiffTime
- connectTimeout :: !(Maybe NominalDiffTime)
- connectTLSParams :: !(Maybe ClientParams)
- connectHooks :: !Hooks
- connectPoolLabel :: !Text
- data Redis a
- data ConnectAddr
- defaultConnectInfo :: ConnectInfo
- parseConnectInfo :: String -> Either String ConnectInfo
- disconnect :: Connection -> IO ()
- checkedConnect :: ConnectInfo -> IO Connection
- withConnect :: (MonadMask m, MonadIO m) => ConnectInfo -> (Connection -> m c) -> m c
- withCheckedConnect :: ConnectInfo -> (Connection -> IO c) -> IO c
- data ConnectError
- connectCluster :: ConnectInfo -> IO Connection
- checkedConnectCluster :: ConnectInfo -> IO Connection
- newtype ClusterConnectError = ClusterConnectError Reply
- data PubSub
- runRedisNonBlocking :: Connection -> Redis a -> IO (Maybe a)
- unRedis :: Redis a -> ReaderT RedisEnv IO a
- reRedis :: ReaderT RedisEnv IO a -> Redis a
- class MonadRedis m => RedisCtx (m :: Type -> Type) (f :: Type -> Type) | m -> f where
- returnDecode :: RedisResult a => Reply -> m (f a)
- class Monad m => MonadRedis (m :: Type -> Type) where
- type SendRequestHook = ([ByteString] -> IO Reply) -> [ByteString] -> IO Reply
- type SendPubSubHook = ([ByteString] -> IO ()) -> [ByteString] -> IO ()
- type CallbackHook = (Message -> IO PubSub) -> Message -> IO PubSub
- type SendHook = (ByteString -> IO ()) -> ByteString -> IO ()
- type ReceiveHook = IO Reply -> IO Reply
- sendRequest :: (RedisCtx m f, RedisResult a) => [ByteString] -> m (f a)
- data ConnectionLostException = ConnectionLost
- newtype ConnectTimeout = ConnectTimeout ConnectPhase
- data HashSlot
- keyToSlot :: ByteString -> HashSlot
- authOpts :: RedisCtx m f => ByteString -> AuthOpts -> m (f Status)
- data AuthOpts = AuthOpts {}
- defaultAuthOpts :: AuthOpts
- echo :: RedisCtx m f => ByteString -> m (f ByteString)
- ping :: RedisCtx m f => m (f Status)
- quit :: RedisCtx m f => m (f Status)
- copyOpts :: RedisCtx m f => ByteString -> ByteString -> CopyOpts -> m (f Bool)
- data CopyOpts = CopyOpts {}
- defaultCopyOpts :: CopyOpts
- del :: RedisCtx m f => NonEmpty ByteString -> m (f Integer)
- dump :: RedisCtx m f => ByteString -> m (f ByteString)
- exists :: RedisCtx m f => ByteString -> m (f Bool)
- expire :: RedisCtx m f => ByteString -> Integer -> m (f Bool)
- expireOpts :: RedisCtx m f => ByteString -> Integer -> ExpireOpts -> m (f Bool)
- data ExpireOpts
- expireat :: RedisCtx m f => ByteString -> Integer -> m (f Bool)
- expireatOpts :: RedisCtx m f => ByteString -> Integer -> ExpireOpts -> m (f Bool)
- data MigrateOpts = MigrateOpts {}
- defaultMigrateOpts :: MigrateOpts
- migrateMultiple :: RedisCtx m f => ByteString -> ByteString -> Integer -> Integer -> MigrateOpts -> [ByteString] -> m (f Status)
- objectRefcount :: RedisCtx m f => ByteString -> m (f Integer)
- objectEncoding :: RedisCtx m f => ByteString -> m (f ByteString)
- objectIdletime :: RedisCtx m f => ByteString -> m (f Integer)
- persist :: RedisCtx m f => ByteString -> m (f Bool)
- expiretime :: RedisCtx m f => ByteString -> m (f Integer)
- pexpire :: RedisCtx m f => ByteString -> Integer -> m (f Bool)
- pexpiretime :: RedisCtx m f => ByteString -> m (f Integer)
- pexpireat :: RedisCtx m f => ByteString -> Integer -> m (f Bool)
- pexpireatOpts :: RedisCtx m f => ByteString -> Integer -> ExpireOpts -> m (f Bool)
- pttl :: RedisCtx m f => ByteString -> m (f Integer)
- randomkey :: RedisCtx m f => m (f (Maybe ByteString))
- renamenx :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
- restore :: RedisCtx m f => ByteString -> Integer -> ByteString -> m (f Status)
- restoreReplace :: RedisCtx m f => ByteString -> Integer -> ByteString -> m (f Status)
- data Cursor
- cursor0 :: Cursor
- data ScanOpts = ScanOpts {}
- defaultScanOpts :: ScanOpts
- scanOpts :: RedisCtx m f => Cursor -> ScanOpts -> Maybe ByteString -> m (f (Cursor, [ByteString]))
- defaultSortOpts :: SortOpts
- data SortOrder
- sortStore :: RedisCtx m f => ByteString -> ByteString -> SortOpts -> m (f Integer)
- ttl :: RedisCtx m f => ByteString -> m (f Integer)
- getType :: RedisCtx m f => ByteString -> m (f RedisType)
- hdel :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f Integer)
- data HashFieldExpirationStatus
- data HashFieldExpirationInfo
- hexists :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
- hexpire :: RedisCtx m f => ByteString -> Integer -> NonEmpty ByteString -> m (f [HashFieldExpirationStatus])
- hexpireOpts :: RedisCtx m f => ByteString -> Integer -> NonEmpty ByteString -> ExpireOpts -> m (f [HashFieldExpirationStatus])
- hexpireat :: RedisCtx m f => ByteString -> Integer -> NonEmpty ByteString -> m (f [HashFieldExpirationStatus])
- hexpireatOpts :: RedisCtx m f => ByteString -> Integer -> NonEmpty ByteString -> ExpireOpts -> m (f [HashFieldExpirationStatus])
- hexpiretime :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [HashFieldExpirationInfo])
- hget :: RedisCtx m f => ByteString -> ByteString -> m (f (Maybe ByteString))
- hgetdel :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [Maybe ByteString])
- hgetex :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [Maybe ByteString])
- data HGetExOpts = HGetExOpts {}
- defaultHGetExOpts :: HGetExOpts
- hgetexOpts :: RedisCtx m f => ByteString -> NonEmpty ByteString -> HGetExOpts -> m (f [Maybe ByteString])
- hgetall :: RedisCtx m f => ByteString -> m (f [(ByteString, ByteString)])
- hincrby :: RedisCtx m f => ByteString -> ByteString -> Int64 -> m (f Int64)
- hincrbyfloat :: RedisCtx m f => ByteString -> ByteString -> Double -> m (f Double)
- hkeys :: RedisCtx m f => ByteString -> m (f [ByteString])
- hlen :: RedisCtx m f => ByteString -> m (f Integer)
- hmget :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [Maybe ByteString])
- hmset :: RedisCtx m f => ByteString -> NonEmpty (ByteString, ByteString) -> m (f Status)
- hrandfield :: RedisCtx m f => ByteString -> m (f (Maybe ByteString))
- hrandfieldCount :: RedisCtx m f => ByteString -> Integer -> m (f [ByteString])
- hrandfieldCountWithValues :: RedisCtx m f => ByteString -> Integer -> m (f [(ByteString, ByteString)])
- hscan :: RedisCtx m f => ByteString -> Cursor -> m (f (Cursor, [(ByteString, ByteString)]))
- hscanOpts :: RedisCtx m f => ByteString -> Cursor -> ScanOpts -> m (f (Cursor, [(ByteString, ByteString)]))
- hpexpire :: RedisCtx m f => ByteString -> Integer -> NonEmpty ByteString -> m (f [HashFieldExpirationStatus])
- hpexpireOpts :: RedisCtx m f => ByteString -> Integer -> NonEmpty ByteString -> ExpireOpts -> m (f [HashFieldExpirationStatus])
- hpexpireat :: RedisCtx m f => ByteString -> Integer -> NonEmpty ByteString -> m (f [HashFieldExpirationStatus])
- hpexpireatOpts :: RedisCtx m f => ByteString -> Integer -> NonEmpty ByteString -> ExpireOpts -> m (f [HashFieldExpirationStatus])
- hpexpiretime :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [HashFieldExpirationInfo])
- hpttl :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [HashFieldExpirationInfo])
- hset :: RedisCtx m f => ByteString -> NonEmpty (ByteString, ByteString) -> m (f Integer)
- hsetex :: RedisCtx m f => ByteString -> NonEmpty (ByteString, ByteString) -> m (f Bool)
- data HSetExCondition
- data HSetExOpts = HSetExOpts {}
- defaultHSetExOpts :: HSetExOpts
- hsetexOpts :: RedisCtx m f => ByteString -> NonEmpty (ByteString, ByteString) -> HSetExOpts -> m (f Bool)
- hsetnx :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Bool)
- hstrlen :: RedisCtx m f => ByteString -> ByteString -> m (f Integer)
- httl :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [HashFieldExpirationInfo])
- hvals :: RedisCtx m f => ByteString -> m (f [ByteString])
- pfadd :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f Integer)
- pfcount :: RedisCtx m f => NonEmpty ByteString -> m (f Integer)
- pfmerge :: RedisCtx m f => ByteString -> [ByteString] -> m (f ByteString)
- blpop :: RedisCtx m f => [ByteString] -> Integer -> m (f (Maybe (ByteString, ByteString)))
- blpopFloat :: RedisCtx m f => [ByteString] -> Integer -> m (f (Maybe (ByteString, ByteString)))
- blmpop :: RedisCtx m f => Double -> NonEmpty ByteString -> ListDirection -> m (f (Maybe (ByteString, [ByteString])))
- blmpopCount :: RedisCtx m f => Double -> NonEmpty ByteString -> ListDirection -> Integer -> m (f (Maybe (ByteString, [ByteString])))
- blmove :: RedisCtx m f => ByteString -> ByteString -> ListDirection -> ListDirection -> Integer -> m (f (Maybe ByteString))
- data ListDirection
- brpop :: RedisCtx m f => NonEmpty ByteString -> Integer -> m (f (Maybe (ByteString, ByteString)))
- brpopFloat :: RedisCtx m f => [ByteString] -> Double -> m (f (Maybe (ByteString, ByteString)))
- brpoplpush :: RedisCtx m f => ByteString -> ByteString -> Integer -> m (f (Maybe ByteString))
- lindex :: RedisCtx m f => ByteString -> Integer -> m (f (Maybe ByteString))
- linsertBefore :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Integer)
- linsertAfter :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Integer)
- llen :: RedisCtx m f => ByteString -> m (f Integer)
- lmpop :: RedisCtx m f => NonEmpty ByteString -> ListDirection -> m (f (Maybe (ByteString, [ByteString])))
- lmpopCount :: RedisCtx m f => NonEmpty ByteString -> ListDirection -> Integer -> m (f (Maybe (ByteString, [ByteString])))
- lpos :: RedisCtx m f => ByteString -> ByteString -> m (f (Maybe Integer))
- data LPosOpts = LPosOpts {}
- defaultLPosOpts :: LPosOpts
- lposOpts :: RedisCtx m f => ByteString -> ByteString -> LPosOpts -> m (f (Maybe Integer))
- lposCount :: RedisCtx m f => ByteString -> ByteString -> Integer -> m (f [Integer])
- lposCountOpts :: RedisCtx m f => ByteString -> ByteString -> Integer -> LPosOpts -> m (f [Integer])
- lpop :: RedisCtx m f => ByteString -> m (f (Maybe ByteString))
- lpopCount :: RedisCtx m f => ByteString -> Integer -> m (f [ByteString])
- lmove :: RedisCtx m f => ByteString -> ByteString -> ListDirection -> ListDirection -> m (f (Maybe ByteString))
- lpush :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f Integer)
- lpushx :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f Integer)
- lrange :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f [ByteString])
- lrem :: RedisCtx m f => ByteString -> Integer -> ByteString -> m (f Integer)
- lset :: RedisCtx m f => ByteString -> Integer -> ByteString -> m (f Status)
- ltrim :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f Status)
- rpop :: RedisCtx m f => ByteString -> m (f (Maybe ByteString))
- rpopCount :: RedisCtx m f => ByteString -> Integer -> m (f [ByteString])
- rpoplpush :: RedisCtx m f => ByteString -> ByteString -> m (f (Maybe ByteString))
- rpush :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f Integer)
- rpushx :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f Integer)
- eval :: (RedisCtx m f, RedisResult a) => ByteString -> [ByteString] -> [ByteString] -> m (f a)
- evalsha :: (RedisCtx m f, RedisResult a) => ByteString -> [ByteString] -> [ByteString] -> m (f a)
- fcall :: (RedisCtx m f, RedisResult a) => ByteString -> [ByteString] -> [ByteString] -> m (f a)
- fcallReadonly :: (RedisCtx m f, RedisResult a) => ByteString -> [ByteString] -> [ByteString] -> m (f a)
- data DebugMode
- functionHelp :: RedisCtx m f => m (f [ByteString])
- functionList :: RedisCtx m f => m (f Reply)
- data FunctionListOpts = FunctionListOpts {}
- defaultFunctionListOpts :: FunctionListOpts
- functionListOpts :: RedisCtx m f => FunctionListOpts -> m (f Reply)
- scriptDebug :: RedisCtx m f => DebugMode -> m (f Bool)
- scriptExists :: RedisCtx m f => NonEmpty ByteString -> m (f [Bool])
- scriptFlush :: RedisCtx m f => m (f Status)
- scriptKill :: RedisCtx m f => m (f Status)
- scriptLoad :: RedisCtx m f => ByteString -> m (f ByteString)
- bgrewriteaof :: RedisCtx m f => m (f Status)
- bgsave :: RedisCtx m f => m (f Status)
- bgsaveSchedule :: RedisCtx m f => m (f Status)
- clientGetname :: RedisCtx m f => m (f (Maybe ByteString))
- clientId :: RedisCtx m f => m (f Integer)
- clientList :: RedisCtx m f => m (f [ByteString])
- clientPause :: RedisCtx m f => Integer -> m (f Status)
- data ReplyMode
- clientReply :: RedisCtx m f => ReplyMode -> m (f Bool)
- clientUnpause :: RedisCtx m f => m (f Status)
- clientSetname :: RedisCtx m f => ByteString -> m (f Status)
- clientNoTouch :: RedisCtx m f => Bool -> m (f Status)
- clientSetinfo :: RedisCtx m f => ClientSetInfoOpts -> m (f Status)
- commandCount :: RedisCtx m f => m (f Integer)
- commandInfo :: RedisCtx m f => [ByteString] -> m (f [ByteString])
- commandList :: RedisCtx m f => m (f [ByteString])
- data CommandListFilter
- commandListOpts :: RedisCtx m f => Maybe CommandListFilter -> m (f [ByteString])
- data HotkeysMetric
- data HotkeysStartOpts = HotkeysStartOpts {}
- defaultHotkeysStartOpts :: HotkeysStartOpts
- data HotkeysSlotRange = HotkeysSlotRange {}
- data HotkeysGetResponse = HotkeysGetResponse {
- hotkeysGetTrackingActive :: Bool
- hotkeysGetSampleRatio :: Integer
- hotkeysGetSelectedSlots :: [HotkeysSlotRange]
- hotkeysGetAllCommandsAllSlotsUs :: Integer
- hotkeysGetNetBytesAllCommandsAllSlots :: Integer
- hotkeysGetCollectionStartTimeUnixMs :: Integer
- hotkeysGetCollectionDurationMs :: Integer
- hotkeysGetTotalCpuTimeUserMs :: Maybe Integer
- hotkeysGetTotalCpuTimeSysMs :: Maybe Integer
- hotkeysGetTotalNetBytes :: Maybe Integer
- hotkeysGetByCpuTimeUs :: Maybe [(ByteString, Integer)]
- hotkeysGetByNetBytes :: Maybe [(ByteString, Integer)]
- hotkeysGetSampledCommandsSelectedSlotsUs :: Maybe Integer
- hotkeysGetAllCommandsSelectedSlotsUs :: Maybe Integer
- hotkeysGetNetBytesSampledCommandsSelectedSlots :: Maybe Integer
- hotkeysGetNetBytesAllCommandsSelectedSlots :: Maybe Integer
- hotkeysGet :: RedisCtx m f => m (f HotkeysGetResponse)
- hotkeysStart :: RedisCtx m f => NonEmpty HotkeysMetric -> m (f Status)
- hotkeysStartOpts :: RedisCtx m f => NonEmpty HotkeysMetric -> HotkeysStartOpts -> m (f Status)
- hotkeysStop :: RedisCtx m f => m (f Status)
- hotkeysReset :: RedisCtx m f => m (f Status)
- configGet :: RedisCtx m f => NonEmpty ByteString -> m (f [(ByteString, ByteString)])
- configResetstat :: RedisCtx m f => m (f Status)
- configRewrite :: RedisCtx m f => m (f Status)
- configSet :: RedisCtx m f => ByteString -> ByteString -> m (f Status)
- dbsize :: RedisCtx m f => m (f Integer)
- debugObject :: RedisCtx m f => ByteString -> m (f ByteString)
- flushall :: RedisCtx m f => m (f Status)
- flushallOpts :: RedisCtx m f => FlushOpts -> m (f Status)
- data FlushOpts
- flushdb :: RedisCtx m f => m (f Status)
- flushdbOpts :: RedisCtx m f => FlushOpts -> m (f Status)
- info :: RedisCtx m f => m (f ByteString)
- infoSection :: RedisCtx m f => ByteString -> m (f ByteString)
- lastsave :: RedisCtx m f => m (f Integer)
- slaveof :: RedisCtx m f => ByteString -> ByteString -> m (f Status)
- data Slowlog = Slowlog {}
- slowlogGet :: RedisCtx m f => Integer -> m (f [Slowlog])
- slowlogLen :: RedisCtx m f => m (f Integer)
- slowlogReset :: RedisCtx m f => m (f Status)
- sadd :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f Integer)
- scard :: RedisCtx m f => ByteString -> m (f Integer)
- sdiff :: RedisCtx m f => NonEmpty ByteString -> m (f [ByteString])
- sdiffstore :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f Integer)
- sinter :: RedisCtx m f => NonEmpty ByteString -> m (f [ByteString])
- sintercard :: RedisCtx m f => NonEmpty ByteString -> m (f Integer)
- data SintercardOpts = SintercardOpts {}
- defaultSintercardOpts :: SintercardOpts
- sintercardOpts :: RedisCtx m f => NonEmpty ByteString -> SintercardOpts -> m (f Integer)
- sinterstore :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f Integer)
- sismember :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
- smembers :: RedisCtx m f => ByteString -> m (f [ByteString])
- smismember :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [Bool])
- smove :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Bool)
- spop :: RedisCtx m f => ByteString -> m (f (Maybe ByteString))
- spopN :: RedisCtx m f => ByteString -> Integer -> m (f [ByteString])
- srandmember :: RedisCtx m f => ByteString -> m (f (Maybe ByteString))
- srandmemberN :: RedisCtx m f => ByteString -> Integer -> m (f [ByteString])
- srem :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f Integer)
- sscan :: RedisCtx m f => ByteString -> Cursor -> m (f (Cursor, [ByteString]))
- sscanOpts :: RedisCtx m f => ByteString -> Cursor -> ScanOpts -> m (f (Cursor, [ByteString]))
- sunion :: RedisCtx m f => NonEmpty ByteString -> m (f [ByteString])
- sunionstore :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f Integer)
- bzpopmax :: RedisCtx m f => NonEmpty ByteString -> Double -> m (f (Maybe (ByteString, ByteString, Double)))
- bzpopmin :: RedisCtx m f => NonEmpty ByteString -> Double -> m (f (Maybe (ByteString, ByteString, Double)))
- data ZaddOpts = ZaddOpts {}
- defaultZaddOpts :: ZaddOpts
- zadd :: RedisCtx m f => ByteString -> [(Double, ByteString)] -> m (f Integer)
- zaddOpts :: RedisCtx m f => ByteString -> [(Double, ByteString)] -> ZaddOpts -> m (f Integer)
- zcard :: RedisCtx m f => ByteString -> m (f Integer)
- zcount :: RedisCtx m f => ByteString -> Double -> Double -> m (f Integer)
- zdiff :: RedisCtx m f => NonEmpty ByteString -> m (f [ByteString])
- zdiffWithscores :: RedisCtx m f => NonEmpty ByteString -> m (f [(ByteString, Double)])
- zdiffstore :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f Integer)
- data SizeCondition
- zincrby :: RedisCtx m f => ByteString -> Integer -> ByteString -> m (f Double)
- data ZPopMinMax
- data ZPopResponse = ZPopResponse {}
- zmpop :: RedisCtx m f => NonEmpty ByteString -> ZPopMinMax -> m (f (Maybe ZPopResponse))
- zmpopCount :: RedisCtx m f => NonEmpty ByteString -> ZPopMinMax -> Integer -> m (f (Maybe ZPopResponse))
- bzmpop :: RedisCtx m f => Double -> NonEmpty ByteString -> ZPopMinMax -> m (f (Maybe ZPopResponse))
- bzmpopCount :: RedisCtx m f => Double -> NonEmpty ByteString -> ZPopMinMax -> Integer -> m (f (Maybe ZPopResponse))
- data ZAggregateOpts = ZAggregateOpts {}
- defaultZAggregateOpts :: ZAggregateOpts
- zinter :: RedisCtx m f => NonEmpty ByteString -> m (f [ByteString])
- zinterWithscores :: RedisCtx m f => NonEmpty ByteString -> m (f [(ByteString, Double)])
- zinterOpts :: RedisCtx m f => NonEmpty ByteString -> ZAggregateOpts -> m (f [ByteString])
- zinterWithscoresOpts :: RedisCtx m f => NonEmpty ByteString -> ZAggregateOpts -> m (f [(ByteString, Double)])
- zinterstore :: RedisCtx m f => ByteString -> NonEmpty ByteString -> Aggregate -> m (f Integer)
- zinterstoreWeights :: RedisCtx m f => ByteString -> NonEmpty (ByteString, Double) -> Aggregate -> m (f Integer)
- zlexcount :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Integer)
- zmscore :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [Maybe Double])
- zpopmin :: RedisCtx m f => ByteString -> m (f (Maybe (ByteString, Double)))
- zpopmax :: RedisCtx m f => ByteString -> m (f (Maybe (ByteString, Double)))
- zrandmember :: RedisCtx m f => ByteString -> m (f (Maybe ByteString))
- zrandmemberN :: RedisCtx m f => ByteString -> Integer -> m (f [ByteString])
- zrandmemberWithscores :: RedisCtx m f => ByteString -> Integer -> m (f [(ByteString, Double)])
- zrange :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f [ByteString])
- zrangeWithscores :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f [(ByteString, Double)])
- data ZRangeStoreRange
- data ZRangeStoreOpts = ZRangeStoreOpts {}
- defaultZRangeStoreOpts :: ZRangeStoreOpts
- zrangestore :: RedisCtx m f => ByteString -> ByteString -> Integer -> Integer -> m (f Integer)
- zrangestoreOpts :: RedisCtx m f => ByteString -> ByteString -> ZRangeStoreRange -> ZRangeStoreOpts -> m (f Integer)
- data RangeLex a
- zrangebylex :: RedisCtx m f => ByteString -> RangeLex ByteString -> RangeLex ByteString -> m (f [ByteString])
- zrangebylexLimit :: RedisCtx m f => ByteString -> RangeLex ByteString -> RangeLex ByteString -> Integer -> Integer -> m (f [ByteString])
- zrangebyscore :: RedisCtx m f => ByteString -> Double -> Double -> m (f [ByteString])
- zrangebyscoreWithscores :: RedisCtx m f => ByteString -> Double -> Double -> m (f [(ByteString, Double)])
- zrangebyscoreLimit :: RedisCtx m f => ByteString -> Double -> Double -> Integer -> Integer -> m (f [ByteString])
- zrangebyscoreWithscoresLimit :: RedisCtx m f => ByteString -> Double -> Double -> Integer -> Integer -> m (f [(ByteString, Double)])
- zrank :: RedisCtx m f => ByteString -> ByteString -> m (f (Maybe Integer))
- zrankWithScore :: RedisCtx m f => ByteString -> ByteString -> m (f (Maybe (Integer, Double)))
- zrem :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f Integer)
- zremrangebylex :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Integer)
- zremrangebyrank :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f Integer)
- zremrangebyscore :: RedisCtx m f => ByteString -> Double -> Double -> m (f Integer)
- zrevrange :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f [ByteString])
- zrevrangeWithscores :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f [(ByteString, Double)])
- zrevrangebyscore :: RedisCtx m f => ByteString -> Double -> Double -> m (f [ByteString])
- zrevrangebyscoreWithscores :: RedisCtx m f => ByteString -> Double -> Double -> m (f [(ByteString, Double)])
- zrevrangebyscoreLimit :: RedisCtx m f => ByteString -> Double -> Double -> Integer -> Integer -> m (f [ByteString])
- zrevrangebyscoreWithscoresLimit :: RedisCtx m f => ByteString -> Double -> Double -> Integer -> Integer -> m (f [(ByteString, Double)])
- zrevrank :: RedisCtx m f => ByteString -> ByteString -> m (f (Maybe Integer))
- zrevrankWithScore :: RedisCtx m f => ByteString -> ByteString -> m (f (Maybe (Integer, Double)))
- zscan :: RedisCtx m f => ByteString -> Cursor -> m (f (Cursor, [(ByteString, Double)]))
- zscanOpts :: RedisCtx m f => ByteString -> Cursor -> ScanOpts -> m (f (Cursor, [(ByteString, Double)]))
- zscore :: RedisCtx m f => ByteString -> ByteString -> m (f (Maybe Double))
- zunion :: RedisCtx m f => NonEmpty ByteString -> m (f [ByteString])
- zunionWithscores :: RedisCtx m f => NonEmpty ByteString -> m (f [(ByteString, Double)])
- zunionOpts :: RedisCtx m f => NonEmpty ByteString -> ZAggregateOpts -> m (f [ByteString])
- zunionWithscoresOpts :: RedisCtx m f => NonEmpty ByteString -> ZAggregateOpts -> m (f [(ByteString, Double)])
- zunionstore :: RedisCtx m f => ByteString -> [ByteString] -> Aggregate -> m (f Integer)
- zunionstoreWeights :: RedisCtx m f => ByteString -> [(ByteString, Double)] -> Aggregate -> m (f Integer)
- data VAddQuantization
- = VAddNoQuant
- | VAddQ8
- | VAddBin
- data VAddOpts = VAddOpts {}
- defaultVAddOpts :: VAddOpts
- data VQuantization
- data VEmbRawResponse = VEmbRawResponse {}
- data VInfoResponse = VInfoResponse {}
- newtype VLinksResponse = VLinksResponse {
- vLinksLayers :: [[ByteString]]
- newtype VLinksWithScoresResponse = VLinksWithScoresResponse {
- vLinksWithScoresLayers :: [[(ByteString, Double)]]
- data VSimQuery
- data VSimOpts = VSimOpts {}
- defaultVSimOpts :: VSimOpts
- data VSimWithAttribsResult = VSimWithAttribsResult {}
- newtype VSimWithAttribsResponse = VSimWithAttribsResponse {}
- vadd :: RedisCtx m f => ByteString -> NonEmpty Double -> ByteString -> m (f Bool)
- vaddOpts :: RedisCtx m f => ByteString -> NonEmpty Double -> ByteString -> VAddOpts -> m (f Bool)
- vcard :: RedisCtx m f => ByteString -> m (f Integer)
- vdim :: RedisCtx m f => ByteString -> m (f Integer)
- vemb :: RedisCtx m f => ByteString -> ByteString -> m (f [Double])
- vembRaw :: RedisCtx m f => ByteString -> ByteString -> m (f (Maybe VEmbRawResponse))
- vgetattr :: RedisCtx m f => ByteString -> ByteString -> m (f (Maybe ByteString))
- vinfo :: RedisCtx m f => ByteString -> m (f (Maybe VInfoResponse))
- vismember :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
- vlinks :: RedisCtx m f => ByteString -> ByteString -> m (f (Maybe VLinksResponse))
- vlinksWithScores :: RedisCtx m f => ByteString -> ByteString -> m (f (Maybe VLinksWithScoresResponse))
- vrandmember :: RedisCtx m f => ByteString -> m (f (Maybe ByteString))
- vrandmemberCount :: RedisCtx m f => ByteString -> Integer -> m (f [ByteString])
- vrange :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f [ByteString])
- vrangeCount :: RedisCtx m f => ByteString -> ByteString -> ByteString -> Integer -> m (f [ByteString])
- vrem :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
- vsetattr :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Bool)
- vsim :: RedisCtx m f => ByteString -> VSimQuery -> m (f [ByteString])
- vsimOpts :: RedisCtx m f => ByteString -> VSimQuery -> VSimOpts -> m (f [ByteString])
- vsimWithScores :: RedisCtx m f => ByteString -> VSimQuery -> m (f [(ByteString, Double)])
- vsimWithScoresOpts :: RedisCtx m f => ByteString -> VSimQuery -> VSimOpts -> m (f [(ByteString, Double)])
- vsimWithScoresWithAttribs :: RedisCtx m f => ByteString -> VSimQuery -> m (f VSimWithAttribsResponse)
- vsimWithScoresWithAttribsOpts :: RedisCtx m f => ByteString -> VSimQuery -> VSimOpts -> m (f VSimWithAttribsResponse)
- data ARGrepPredicate
- data ARGrepCombine
- data ARGrepOpts = ARGrepOpts {}
- defaultARGrepOpts :: ARGrepOpts
- data ARLastItemsOpts = ARLastItemsOpts {}
- defaultARLastItemsOpts :: ARLastItemsOpts
- data ARScanOpts = ARScanOpts {}
- defaultARScanOpts :: ARScanOpts
- newtype ARIndexValuePairsResponse = ARIndexValuePairsResponse {
- arIndexValuePairs :: [(Integer, ByteString)]
- data ARInfoResponse = ARInfoResponse {
- arInfoCount :: Integer
- arInfoLength :: Integer
- arInfoNextInsertIndex :: Integer
- arInfoSlices :: Integer
- arInfoDirectorySize :: Integer
- arInfoSuperDirEntries :: Integer
- arInfoSliceSize :: Integer
- arInfoDenseSlices :: Maybe Integer
- arInfoSparseSlices :: Maybe Integer
- arInfoAvgDenseSize :: Maybe Double
- arInfoAvgDenseFill :: Maybe Double
- arInfoAvgSparseSize :: Maybe Double
- data AROpValue
- data AROpCount
- arcount :: RedisCtx m f => ByteString -> m (f Integer)
- ardel :: RedisCtx m f => ByteString -> NonEmpty Integer -> m (f Integer)
- argetrange :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f [Maybe ByteString])
- argrep :: RedisCtx m f => ByteString -> ByteString -> ByteString -> NonEmpty ARGrepPredicate -> m (f [Integer])
- argrepOpts :: RedisCtx m f => ByteString -> ByteString -> ByteString -> NonEmpty ARGrepPredicate -> ARGrepOpts -> m (f [Integer])
- argrepWithValues :: RedisCtx m f => ByteString -> ByteString -> ByteString -> NonEmpty ARGrepPredicate -> m (f ARIndexValuePairsResponse)
- argrepWithValuesOpts :: RedisCtx m f => ByteString -> ByteString -> ByteString -> NonEmpty ARGrepPredicate -> ARGrepOpts -> m (f ARIndexValuePairsResponse)
- arinfo :: RedisCtx m f => ByteString -> m (f ARInfoResponse)
- arinfoFull :: RedisCtx m f => ByteString -> m (f ARInfoResponse)
- arinsert :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f Integer)
- arlastitems :: RedisCtx m f => ByteString -> Integer -> m (f [Maybe ByteString])
- arlastitemsOpts :: RedisCtx m f => ByteString -> Integer -> ARLastItemsOpts -> m (f [Maybe ByteString])
- arlen :: RedisCtx m f => ByteString -> m (f Integer)
- armget :: RedisCtx m f => ByteString -> NonEmpty Integer -> m (f [Maybe ByteString])
- arnext :: RedisCtx m f => ByteString -> m (f (Maybe Integer))
- aropValue :: RedisCtx m f => ByteString -> Integer -> Integer -> AROpValue -> m (f (Maybe ByteString))
- aropCount :: RedisCtx m f => ByteString -> Integer -> Integer -> AROpCount -> m (f (Maybe Integer))
- arring :: RedisCtx m f => ByteString -> Integer -> NonEmpty ByteString -> m (f Integer)
- arscan :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f ARIndexValuePairsResponse)
- arscanOpts :: RedisCtx m f => ByteString -> Integer -> Integer -> ARScanOpts -> m (f ARIndexValuePairsResponse)
- arseek :: RedisCtx m f => ByteString -> Integer -> m (f Bool)
- arset :: RedisCtx m f => ByteString -> Integer -> NonEmpty ByteString -> m (f Integer)
- bitcountRange :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f Integer)
- bitopAnd :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
- bitopOr :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
- bitopXor :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
- bitopNot :: RedisCtx m f => ByteString -> ByteString -> m (f Integer)
- bitpos :: RedisCtx m f => ByteString -> Integer -> Integer -> Integer -> m (f Integer)
- bitposOpts :: RedisCtx m f => ByteString -> Integer -> BitposOpts -> m (f Integer)
- data BitposOpts
- data BitposType
- decr :: RedisCtx m f => ByteString -> m (f Integer)
- decrby :: RedisCtx m f => ByteString -> Integer -> m (f Integer)
- delex :: RedisCtx m f => ByteString -> m (f Bool)
- data DelexCondition
- delexWhen :: RedisCtx m f => ByteString -> DelexCondition -> m (f Bool)
- digest :: RedisCtx m f => ByteString -> m (f (Maybe ByteString))
- getbit :: RedisCtx m f => ByteString -> Integer -> m (f Integer)
- getdel :: RedisCtx m f => ByteString -> m (f (Maybe ByteString))
- getex :: RedisCtx m f => ByteString -> m (f (Maybe ByteString))
- data IncrexExpiration
- data IncrexOpts a = IncrexOpts {}
- defaultIncrexOpts :: IncrexOpts a
- increx :: RedisCtx m f => ByteString -> m (f (Integer, Integer))
- increxOpts :: RedisCtx m f => ByteString -> IncrexOpts Integer -> m (f (Integer, Integer))
- increxBy :: RedisCtx m f => ByteString -> Integer -> IncrexOpts Integer -> m (f (Integer, Integer))
- increxByFloat :: RedisCtx m f => ByteString -> Double -> IncrexOpts Double -> m (f (Double, Double))
- data GetExOpts = GetExOpts {}
- defaultGetExOpts :: GetExOpts
- getexOpts :: RedisCtx m f => ByteString -> GetExOpts -> m (f (Maybe ByteString))
- getrange :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f ByteString)
- getset :: RedisCtx m f => ByteString -> ByteString -> m (f (Maybe ByteString))
- incr :: RedisCtx m f => ByteString -> m (f Integer)
- incrby :: RedisCtx m f => ByteString -> Integer -> m (f Integer)
- incrbyfloat :: RedisCtx m f => ByteString -> Double -> m (f Double)
- mget :: RedisCtx m f => NonEmpty ByteString -> m (f [Maybe ByteString])
- mset :: RedisCtx m f => NonEmpty (ByteString, ByteString) -> m (f Status)
- msetex :: RedisCtx m f => NonEmpty (ByteString, ByteString) -> m (f Bool)
- msetexOpts :: RedisCtx m f => NonEmpty (ByteString, ByteString) -> SetOpts -> m (f Bool)
- msetnx :: RedisCtx m f => NonEmpty (ByteString, ByteString) -> m (f Bool)
- psetex :: RedisCtx m f => ByteString -> Integer -> ByteString -> m (f Status)
- data Condition
- data SetOpts = SetOpts {}
- defaultSetOpts :: SetOpts
- setOpts :: RedisCtx m f => ByteString -> ByteString -> SetOpts -> m (f Status)
- setGet :: RedisCtx m f => ByteString -> ByteString -> m (f ByteString)
- setGetOpts :: RedisCtx m f => ByteString -> ByteString -> SetOpts -> m (f ByteString)
- setbit :: RedisCtx m f => ByteString -> Integer -> ByteString -> m (f Integer)
- setex :: RedisCtx m f => ByteString -> Integer -> ByteString -> m (f Status)
- setnx :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
- setrange :: RedisCtx m f => ByteString -> Integer -> ByteString -> m (f Integer)
- strlen :: RedisCtx m f => ByteString -> m (f Integer)
- substr :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f ByteString)
- data XReadOpts = XReadOpts {}
- defaultXreadOpts :: XReadOpts
- data StreamsRecord = StreamsRecord {
- recordId :: ByteString
- keyValues :: [(ByteString, ByteString)]
- xadd :: RedisCtx m f => ByteString -> ByteString -> [(ByteString, ByteString)] -> m (f ByteString)
- xaddOpts :: RedisCtx m f => ByteString -> ByteString -> [(ByteString, ByteString)] -> XAddOpts -> m (f ByteString)
- data XAddOpts = XAddOpts {}
- defaultXAddOpts :: XAddOpts
- data TrimStrategy
- data TrimType
- = TrimExact
- | TrimApprox (Maybe Integer)
- trimOpts :: TrimStrategy -> TrimType -> TrimOpts
- xread :: RedisCtx m f => [(ByteString, ByteString)] -> m (f (Maybe [XReadResponse]))
- xreadOpts :: RedisCtx m f => [(ByteString, ByteString)] -> XReadOpts -> m (f (Maybe [XReadResponse]))
- xreadGroup :: RedisCtx m f => ByteString -> ByteString -> [(ByteString, ByteString)] -> m (f (Maybe [XReadResponse]))
- data XReadGroupOpts = XReadGroupOpts {}
- defaultXReadGroupOpts :: XReadGroupOpts
- xreadGroupOpts :: RedisCtx m f => ByteString -> ByteString -> [(ByteString, ByteString)] -> XReadGroupOpts -> m (f (Maybe [XReadResponse]))
- xack :: RedisCtx m f => ByteString -> ByteString -> [ByteString] -> m (f Integer)
- xackdel :: RedisCtx m f => ByteString -> ByteString -> NonEmpty ByteString -> m (f [XEntryDeletionResult])
- xackdelOpts :: RedisCtx m f => ByteString -> ByteString -> NonEmpty ByteString -> XEntryDeletionOpts -> m (f [XEntryDeletionResult])
- data XRefPolicy
- data XEntryDeletionOpts = XEntryDeletionOpts {}
- defaultXEntryDeletionOpts :: XEntryDeletionOpts
- data XEntryDeletionResult
- data XCfgSetOpts = XCfgSetOpts {}
- defaultXCfgSetOpts :: XCfgSetOpts
- xcfgset :: RedisCtx m f => ByteString -> XCfgSetOpts -> m (f Status)
- data XNackMode
- data XNackOpts = XNackOpts {}
- defaultXNackOpts :: XNackOpts
- xidmprecord :: RedisCtx m f => ByteString -> ByteString -> ByteString -> ByteString -> m (f Status)
- xnack :: RedisCtx m f => ByteString -> ByteString -> XNackMode -> NonEmpty ByteString -> m (f Integer)
- xnackOpts :: RedisCtx m f => ByteString -> ByteString -> XNackMode -> NonEmpty ByteString -> XNackOpts -> m (f Integer)
- xgroupCreate :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Status)
- xgroupCreateOpts :: RedisCtx m f => ByteString -> ByteString -> ByteString -> XGroupCreateOpts -> m (f Status)
- data XGroupCreateOpts = XGroupCreateOpts {}
- defaultXGroupCreateOpts :: XGroupCreateOpts
- xgroupCreateConsumer :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Bool)
- xgroupSetId :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Status)
- xgroupSetIdOpts :: RedisCtx m f => ByteString -> ByteString -> ByteString -> XGroupSetIdOpts -> m (f Status)
- newtype XGroupSetIdOpts = XGroupSetIdOpts {}
- defaultXGroupSetIdOpts :: XGroupSetIdOpts
- xgroupDestroy :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
- xgroupDelConsumer :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Integer)
- xrange :: RedisCtx m f => ByteString -> ByteString -> ByteString -> Maybe Integer -> m (f [StreamsRecord])
- xrevRange :: RedisCtx m f => ByteString -> ByteString -> ByteString -> Maybe Integer -> m (f [StreamsRecord])
- xlen :: RedisCtx m f => ByteString -> m (f Integer)
- xpendingSummary :: RedisCtx m f => ByteString -> ByteString -> m (f XPendingSummaryResponse)
- data XPendingSummaryResponse = XPendingSummaryResponse {}
- data XPendingDetailOpts = XPendingDetailOpts {}
- defaultXPendingDetailOpts :: XPendingDetailOpts
- data XPendingDetailRecord = XPendingDetailRecord {}
- xpendingDetail :: RedisCtx m f => ByteString -> ByteString -> ByteString -> ByteString -> Integer -> XPendingDetailOpts -> m (f [XPendingDetailRecord])
- data XClaimOpts = XClaimOpts {}
- defaultXClaimOpts :: XClaimOpts
- xclaim :: RedisCtx m f => ByteString -> ByteString -> ByteString -> Integer -> XClaimOpts -> [ByteString] -> m (f [StreamsRecord])
- xclaimJustIds :: RedisCtx m f => ByteString -> ByteString -> ByteString -> Integer -> XClaimOpts -> [ByteString] -> m (f [ByteString])
- xautoclaim :: RedisCtx m f => ByteString -> ByteString -> ByteString -> Integer -> ByteString -> m (f XAutoclaimStreamsResult)
- xautoclaimOpts :: RedisCtx m f => ByteString -> ByteString -> ByteString -> Integer -> ByteString -> XAutoclaimOpts -> m (f XAutoclaimStreamsResult)
- newtype XAutoclaimOpts = XAutoclaimOpts {}
- type XAutoclaimStreamsResult = XAutoclaimResult StreamsRecord
- data XAutoclaimResult resultFormat = XAutoclaimResult {
- xAutoclaimResultId :: ByteString
- xAutoclaimClaimedMessages :: [resultFormat]
- xAutoclaimDeletedMessages :: [ByteString]
- xautoclaimJustIds :: RedisCtx m f => ByteString -> ByteString -> ByteString -> Integer -> ByteString -> m (f XAutoclaimJustIdsResult)
- xautoclaimJustIdsOpts :: RedisCtx m f => ByteString -> ByteString -> ByteString -> Integer -> ByteString -> XAutoclaimOpts -> m (f XAutoclaimJustIdsResult)
- type XAutoclaimJustIdsResult = XAutoclaimResult ByteString
- data XInfoConsumersResponse = XInfoConsumersResponse {}
- xinfoConsumers :: RedisCtx m f => ByteString -> ByteString -> m (f [XInfoConsumersResponse])
- data XInfoGroupsResponse = XInfoGroupsResponse {}
- xinfoGroups :: RedisCtx m f => ByteString -> m (f [XInfoGroupsResponse])
- data XInfoStreamResponse
- = XInfoStreamResponse {
- xinfoStreamLength :: Integer
- xinfoStreamRadixTreeKeys :: Integer
- xinfoStreamRadixTreeNodes :: Integer
- xinfoMaxDeletedEntryId :: Maybe ByteString
- xinfoEntriesAdded :: Maybe Integer
- xinfoRecordedFirstEntryId :: Maybe ByteString
- xinfoStreamNumGroups :: Integer
- xinfoStreamLastEntryId :: ByteString
- xinfoStreamFirstEntry :: StreamsRecord
- xinfoStreamLastEntry :: StreamsRecord
- | XInfoStreamEmptyResponse { }
- = XInfoStreamResponse {
- xinfoStream :: RedisCtx m f => ByteString -> m (f XInfoStreamResponse)
- xdel :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f Integer)
- xdelex :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [XEntryDeletionResult])
- xdelexOpts :: RedisCtx m f => ByteString -> NonEmpty ByteString -> XEntryDeletionOpts -> m (f [XEntryDeletionResult])
- xtrim :: RedisCtx m f => ByteString -> TrimOpts -> m (f Integer)
- data GeoUnit
- data GeoOrder
- data GeoCoordinates = GeoCoordinates {}
- data GeoLocation = GeoLocation {}
- data GeoSearchFrom
- data GeoSearchBy
- data GeoSearchOpts = GeoSearchOpts {}
- defaultGeoSearchOpts :: GeoSearchOpts
- data GeoSearchStoreOpts = GeoSearchStoreOpts {}
- defaultGeoSearchStoreOpts :: GeoSearchStoreOpts
- data GeoAddOpts = GeoAddOpts {}
- defaultGeoAddOpts :: GeoAddOpts
- geoadd :: RedisCtx m f => ByteString -> [(Double, Double, ByteString)] -> m (f Integer)
- geoaddOpts :: RedisCtx m f => ByteString -> [(Double, Double, ByteString)] -> GeoAddOpts -> m (f Integer)
- geodist :: RedisCtx m f => ByteString -> ByteString -> ByteString -> Maybe GeoUnit -> m (f (Maybe Double))
- geopos :: RedisCtx m f => ByteString -> [ByteString] -> m (f [Maybe GeoCoordinates])
- geoSearch :: RedisCtx m f => ByteString -> GeoSearchFrom -> GeoSearchBy -> GeoSearchOpts -> m (f [GeoLocation])
- geoSearchStore :: RedisCtx m f => ByteString -> ByteString -> GeoSearchFrom -> GeoSearchBy -> GeoSearchStoreOpts -> m (f Integer)
- inf :: RealFloat a => a
- data ClusterInfoResponse = ClusterInfoResponse {
- clusterInfoResponseState :: ClusterInfoResponseState
- clusterInfoResponseSlotsAssigned :: Integer
- clusterInfoResponseSlotsOK :: Integer
- clusterInfoResponseSlotsPfail :: Integer
- clusterInfoResponseSlotsFail :: Integer
- clusterInfoResponseKnownNodes :: Integer
- clusterInfoResponseSize :: Integer
- clusterInfoResponseCurrentEpoch :: Integer
- clusterInfoResponseMyEpoch :: Integer
- clusterInfoResponseStatsMessagesSent :: Integer
- clusterInfoResponseStatsMessagesReceived :: Integer
- clusterInfoResponseTotalLinksBufferLimitExceeded :: Integer
- clusterInfoResponseStatsMessagesPingSent :: Maybe Integer
- clusterInfoResponseStatsMessagesPingReceived :: Maybe Integer
- clusterInfoResponseStatsMessagesPongSent :: Maybe Integer
- clusterInfoResponseStatsMessagesPongReceived :: Maybe Integer
- clusterInfoResponseStatsMessagesMeetSent :: Maybe Integer
- clusterInfoResponseStatsMessagesMeetReceived :: Maybe Integer
- clusterInfoResponseStatsMessagesFailSent :: Maybe Integer
- clusterInfoResponseStatsMessagesFailReceived :: Maybe Integer
- clusterInfoResponseStatsMessagesPublishSent :: Maybe Integer
- clusterInfoResponseStatsMessagesPublishReceived :: Maybe Integer
- clusterInfoResponseStatsMessagesAuthReqSent :: Maybe Integer
- clusterInfoResponseStatsMessagesAuthReqReceived :: Maybe Integer
- clusterInfoResponseStatsMessagesAuthAckSent :: Maybe Integer
- clusterInfoResponseStatsMessagesAuthAckReceived :: Maybe Integer
- clusterInfoResponseStatsMessagesUpdateSent :: Maybe Integer
- clusterInfoResponseStatsMessagesUpdateReceived :: Maybe Integer
- clusterInfoResponseStatsMessagesMfstartSent :: Maybe Integer
- clusterInfoResponseStatsMessagesMfstartReceived :: Maybe Integer
- clusterInfoResponseStatsMessagesModuleSent :: Maybe Integer
- clusterInfoResponseStatsMessagesModuleReceived :: Maybe Integer
- clusterInfoResponseStatsMessagesPublishshardSent :: Maybe Integer
- clusterInfoResponseStatsMessagesPublishshardReceived :: Maybe Integer
- clusterInfo :: RedisCtx m f => m (f ClusterInfoResponse)
- clusterMyshardid :: RedisCtx m f => m (f ByteString)
- data ClusterNodesResponse = ClusterNodesResponse {}
- data ClusterNodesResponseEntry = ClusterNodesResponseEntry {
- clusterNodesResponseNodeId :: ByteString
- clusterNodesResponseNodeIp :: ByteString
- clusterNodesResponseNodePort :: Integer
- clusterNodesResponseNodeFlags :: [ByteString]
- clusterNodesResponseMasterId :: Maybe ByteString
- clusterNodesResponsePingSent :: Integer
- clusterNodesResponsePongReceived :: Integer
- clusterNodesResponseConfigEpoch :: Integer
- clusterNodesResponseLinkState :: ByteString
- clusterNodesResponseSlots :: [ClusterNodesResponseSlotSpec]
- data ClusterNodesResponseSlotSpec
- clusterNodes :: RedisCtx m f => m (f ClusterNodesResponse)
- data ClusterSlotsResponse = ClusterSlotsResponse {}
- data ClusterSlotsResponseEntry = ClusterSlotsResponseEntry {}
- data ClusterSlotsNode = ClusterSlotsNode {}
- clusterSlots :: RedisCtx m f => m (f ClusterSlotsResponse)
- data ClusterSlotStatsMetric
- data ClusterSlotStatsOrderByOpts = ClusterSlotStatsOrderByOpts {}
- defaultClusterSlotStatsOrderByOpts :: ClusterSlotStatsOrderByOpts
- data ClusterSlotStatsQuery
- data ClusterSlotStatsResponse = ClusterSlotStatsResponse {}
- data ClusterSlotStatsResponseEntry = ClusterSlotStatsResponseEntry {
- clusterSlotStatsResponseEntrySlot :: Integer
- clusterSlotStatsResponseEntryKeyCount :: Maybe Integer
- clusterSlotStatsResponseEntryCpuUsec :: Maybe Integer
- clusterSlotStatsResponseEntryMemoryBytes :: Maybe Integer
- clusterSlotStatsResponseEntryNetworkBytesIn :: Maybe Integer
- clusterSlotStatsResponseEntryNetworkBytesOut :: Maybe Integer
- clusterSlotStats :: RedisCtx m f => ClusterSlotStatsQuery -> m (f ClusterSlotStatsResponse)
- clusterSlotStatsSlotsRange :: RedisCtx m f => Integer -> Integer -> m (f ClusterSlotStatsResponse)
- clusterSlotStatsOrderBy :: RedisCtx m f => ClusterSlotStatsMetric -> m (f ClusterSlotStatsResponse)
- clusterSlotStatsOrderByOpts :: RedisCtx m f => ClusterSlotStatsMetric -> ClusterSlotStatsOrderByOpts -> m (f ClusterSlotStatsResponse)
- data ClusterMigrationSlotRange = ClusterMigrationSlotRange {}
- data ClusterMigrationTask = ClusterMigrationTask {
- clusterMigrationTaskId :: ByteString
- clusterMigrationTaskSlots :: [ClusterMigrationSlotRange]
- clusterMigrationTaskSource :: Maybe ByteString
- clusterMigrationTaskDest :: Maybe ByteString
- clusterMigrationTaskOperation :: Maybe ByteString
- clusterMigrationTaskState :: Maybe ByteString
- clusterMigrationTaskLastError :: Maybe ByteString
- clusterMigrationTaskRetries :: Maybe Integer
- clusterMigrationTaskCreateTime :: Maybe Integer
- clusterMigrationTaskStartTime :: Maybe Integer
- clusterMigrationTaskEndTime :: Maybe Integer
- clusterMigrationTaskWritePauseMs :: Maybe Integer
- newtype ClusterMigrationStatusResponse = ClusterMigrationStatusResponse {}
- clusterMigrationImport :: RedisCtx m f => NonEmpty (Integer, Integer) -> m (f ByteString)
- clusterMigrationCancelId :: RedisCtx m f => ByteString -> m (f Integer)
- clusterMigrationCancelAll :: RedisCtx m f => m (f Integer)
- clusterMigrationStatus :: RedisCtx m f => m (f ClusterMigrationStatusResponse)
- clusterMigrationStatusAll :: RedisCtx m f => m (f ClusterMigrationStatusResponse)
- clusterMigrationStatusId :: RedisCtx m f => ByteString -> m (f ClusterMigrationStatusResponse)
- clusterSetSlotNode :: RedisCtx m f => Integer -> ByteString -> m (f Status)
- clusterSetSlotStable :: RedisCtx m f => Integer -> m (f Status)
- clusterSetSlotImporting :: RedisCtx m f => Integer -> ByteString -> m (f Status)
- clusterSetSlotMigrating :: RedisCtx m f => Integer -> ByteString -> m (f Status)
- clusterGetKeysInSlot :: RedisCtx m f => Integer -> Integer -> m (f [ByteString])
- command :: RedisCtx m f => m (f [CommandInfo])
- functionDelete :: RedisCtx m f => ByteString -> m (f Status)
- functionDump :: RedisCtx m f => m (f ByteString)
- functionFlush :: RedisCtx m f => m (f Status)
- functionFlushOpts :: RedisCtx m f => FlushOpts -> m (f Status)
- functionKill :: RedisCtx m f => m (f Status)
- functionLoad :: RedisCtx m f => ByteString -> m (f ByteString)
- functionLoadReplace :: RedisCtx m f => ByteString -> m (f ByteString)
- data FunctionRestorePolicy
- data FunctionRestoreOpts
- defaultFunctionRestoreOpts :: FunctionRestoreOpts
- functionRestore :: RedisCtx m f => ByteString -> m (f Status)
- functionRestoreOpts :: RedisCtx m f => ByteString -> FunctionRestoreOpts -> m (f Status)
- functionStats :: RedisCtx m f => m (f Reply)
- data WaitAofResult = WaitAofResult {}
- waitaof :: RedisCtx m f => Integer -> Integer -> Integer -> m (f WaitAofResult)
- publish :: RedisCtx m f => ByteString -> ByteString -> m (f Integer)
- pubSub :: PubSub -> (Message -> IO PubSub) -> Redis ()
- subscribe :: [ByteString] -> PubSub
- unsubscribe :: [ByteString] -> PubSub
- psubscribe :: [ByteString] -> PubSub
- punsubscribe :: [ByteString] -> PubSub
- pubSubForever :: Connection -> PubSubController -> IO () -> IO ()
- type RedisChannel = ByteString
- type RedisPChannel = ByteString
- type MessageCallback = ByteString -> IO ()
- type PMessageCallback = RedisChannel -> ByteString -> IO ()
- data PubSubController
- newPubSubController :: MonadIO m => [(RedisChannel, MessageCallback)] -> [(RedisPChannel, PMessageCallback)] -> m PubSubController
- currentChannels :: FunctorMonadIO m => PubSubController -> m [RedisChannel]
- currentPChannels :: FunctorMonadIO m => PubSubController -> m [RedisPChannel]
- addChannels :: MonadIO m => PubSubController -> [(RedisChannel, MessageCallback)] -> [(RedisPChannel, PMessageCallback)] -> m UnregisterCallbacksAction
- addChannelsAndWait :: MonadIO m => PubSubController -> [(RedisChannel, MessageCallback)] -> [(RedisPChannel, PMessageCallback)] -> m UnregisterCallbacksAction
- removeChannels :: MonadIO m => PubSubController -> [RedisChannel] -> [RedisPChannel] -> m ()
- removeChannelsAndWait :: MonadIO m => PubSubController -> [RedisChannel] -> [RedisPChannel] -> m ()
- type UnregisterCallbacksAction = IO ()
- pendingChannels :: MonadIO m => PubSubController -> m (HashSet RedisChannel)
- pendingPatternChannels :: MonadIO m => PubSubController -> m (HashSet RedisPChannel)
- withPubSub :: Connection -> [ByteString] -> [ByteString] -> (STM Message -> IO r) -> IO r
- watch :: [ByteString] -> Redis (Either Reply Status)
- unwatch :: Redis (Either Reply Status)
- multiExec :: RedisTx (Queued a) -> Redis (TxResult a)
- data Queued a
- data TxResult a
- data RedisTx a
- data TsSample = TsSample {}
- data TsEncoding
- data TsDuplicatePolicy
- data TsIgnore = TsIgnore {}
- data TsCreateOpts = TsCreateOpts {}
- defaultTsCreateOpts :: TsCreateOpts
- data TsAlterOpts = TsAlterOpts {}
- defaultTsAlterOpts :: TsAlterOpts
- data TsAddOpts = TsAddOpts {}
- defaultTsAddOpts :: TsAddOpts
- data TsIncrByOpts = TsIncrByOpts {}
- defaultTsIncrByOpts :: TsIncrByOpts
- data TsGetOpts = TsGetOpts {
- tsGetLatest :: Bool
- defaultTsGetOpts :: TsGetOpts
- data TsAggregator
- newtype TsAggregators = TsAggregators {}
- data TsBucketTimestamp
- data TsAggregationOpts = TsAggregationOpts {}
- data TsRangeOpts = TsRangeOpts {}
- defaultTsRangeOpts :: TsRangeOpts
- data TsLabelSelection
- data TsGroupByReduce = TsGroupByReduce {}
- data TsMGetOpts = TsMGetOpts {}
- defaultTsMGetOpts :: TsMGetOpts
- data TsMRangeOpts = TsMRangeOpts {}
- defaultTsMRangeOpts :: TsMRangeOpts
- data TsInfoOpts
- tsLabelsToArgs :: [(ByteString, ByteString)] -> [ByteString]
- tsIgnoreToArgs :: TsIgnore -> [ByteString]
- tsCreateOptsToArgs :: TsCreateOpts -> [ByteString]
- tsAlterOptsToArgs :: TsAlterOpts -> [ByteString]
- tsAddOptsToArgs :: TsAddOpts -> [ByteString]
- tsIncrByOptsToArgs :: TsIncrByOpts -> [ByteString]
- tsAggregationToArgs :: TsAggregationOpts -> [ByteString]
- tsRangeOptsToArgs :: TsRangeOpts -> [ByteString]
- tsLabelSelectionToArgs :: TsLabelSelection -> [ByteString]
- tsMGetOptsToArgs :: TsMGetOpts -> [ByteString]
- tsGroupByReduceToArgs :: TsGroupByReduce -> [ByteString]
- tsMRangeOptsToArgs :: TsMRangeOpts -> [ByteString]
- tsAdd :: RedisCtx m f => ByteString -> ByteString -> Double -> m (f Integer)
- tsAddOpts :: RedisCtx m f => ByteString -> ByteString -> Double -> TsAddOpts -> m (f Integer)
- tsAlter :: RedisCtx m f => ByteString -> TsAlterOpts -> m (f Status)
- tsCreate :: RedisCtx m f => ByteString -> m (f Status)
- tsCreateOpts :: RedisCtx m f => ByteString -> TsCreateOpts -> m (f Status)
- tsCreaterule :: RedisCtx m f => ByteString -> ByteString -> TsAggregator -> Integer -> m (f Status)
- tsCreateruleAlign :: RedisCtx m f => ByteString -> ByteString -> TsAggregator -> Integer -> Integer -> m (f Status)
- tsDecrby :: RedisCtx m f => ByteString -> Double -> m (f Integer)
- tsDecrbyOpts :: RedisCtx m f => ByteString -> Double -> TsIncrByOpts -> m (f Integer)
- tsDel :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f Integer)
- tsDelrule :: RedisCtx m f => ByteString -> ByteString -> m (f Status)
- tsGet :: RedisCtx m f => ByteString -> m (f (Maybe TsSample))
- tsGetOpts :: RedisCtx m f => ByteString -> TsGetOpts -> m (f (Maybe TsSample))
- tsIncrby :: RedisCtx m f => ByteString -> Double -> m (f Integer)
- tsIncrbyOpts :: RedisCtx m f => ByteString -> Double -> TsIncrByOpts -> m (f Integer)
- tsInfo :: RedisCtx m f => ByteString -> m (f Reply)
- tsInfoOpts :: RedisCtx m f => ByteString -> TsInfoOpts -> m (f Reply)
- tsMadd :: RedisCtx m f => NonEmpty (ByteString, ByteString, Double) -> m (f [Integer])
- tsMget :: RedisCtx m f => NonEmpty ByteString -> m (f Reply)
- tsMgetOpts :: RedisCtx m f => NonEmpty ByteString -> TsMGetOpts -> m (f Reply)
- tsMrange :: RedisCtx m f => ByteString -> ByteString -> NonEmpty ByteString -> m (f Reply)
- tsMrangeOpts :: RedisCtx m f => ByteString -> ByteString -> NonEmpty ByteString -> TsMRangeOpts -> m (f Reply)
- tsMrevrange :: RedisCtx m f => ByteString -> ByteString -> NonEmpty ByteString -> m (f Reply)
- tsMrevrangeOpts :: RedisCtx m f => ByteString -> ByteString -> NonEmpty ByteString -> TsMRangeOpts -> m (f Reply)
- tsQueryindex :: RedisCtx m f => NonEmpty ByteString -> m (f [ByteString])
- tsRange :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f [TsSample])
- tsRangeOpts :: RedisCtx m f => ByteString -> ByteString -> ByteString -> TsRangeOpts -> m (f [TsSample])
- tsRevrange :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f [TsSample])
- tsRevrangeOpts :: RedisCtx m f => ByteString -> ByteString -> ByteString -> TsRangeOpts -> m (f [TsSample])
- data TopkInfo = TopkInfo {}
- topkAdd :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [Maybe ByteString])
- topkCount :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [Integer])
- topkIncrby :: RedisCtx m f => ByteString -> NonEmpty (ByteString, Integer) -> m (f [Maybe ByteString])
- topkInfo :: RedisCtx m f => ByteString -> m (f TopkInfo)
- topkList :: RedisCtx m f => ByteString -> m (f [ByteString])
- topkListWithCount :: RedisCtx m f => ByteString -> m (f [(ByteString, Integer)])
- topkReserve :: RedisCtx m f => ByteString -> Integer -> Integer -> Integer -> Double -> m (f Status)
- topkQuery :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [Bool])
- data TDigestCreateOpts = TDigestCreateOpts {}
- defaultTDigestCreateOpts :: TDigestCreateOpts
- data TDigestMergeOpts = TDigestMergeOpts {}
- defaultTDigestMergeOpts :: TDigestMergeOpts
- data TDigestInfo = TDigestInfo {
- tdigestInfoCompression :: Integer
- tdigestInfoCapacity :: Integer
- tdigestInfoMergedNodes :: Integer
- tdigestInfoUnmergedNodes :: Integer
- tdigestInfoMergedWeight :: Integer
- tdigestInfoUnmergedWeight :: Integer
- tdigestInfoObservations :: Integer
- tdigestInfoTotalCompressions :: Integer
- tdigestInfoMemoryUsage :: Integer
- tdigestCreateOptsToArgs :: TDigestCreateOpts -> [ByteString]
- tdigestMergeOptsToArgs :: TDigestMergeOpts -> [ByteString]
- tdigestAdd :: RedisCtx m f => ByteString -> NonEmpty Double -> m (f Status)
- tdigestByrank :: RedisCtx m f => ByteString -> NonEmpty Integer -> m (f [Double])
- tdigestByrevrank :: RedisCtx m f => ByteString -> NonEmpty Integer -> m (f [Double])
- tdigestCdf :: RedisCtx m f => ByteString -> NonEmpty Double -> m (f [Double])
- tdigestCreate :: RedisCtx m f => ByteString -> m (f Status)
- tdigestCreateOpts :: RedisCtx m f => ByteString -> TDigestCreateOpts -> m (f Status)
- tdigestInfo :: RedisCtx m f => ByteString -> m (f TDigestInfo)
- tdigestMax :: RedisCtx m f => ByteString -> m (f Double)
- tdigestMerge :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f Status)
- tdigestMergeOpts :: RedisCtx m f => ByteString -> NonEmpty ByteString -> TDigestMergeOpts -> m (f Status)
- tdigestMin :: RedisCtx m f => ByteString -> m (f Double)
- tdigestQuantile :: RedisCtx m f => ByteString -> NonEmpty Double -> m (f [Double])
- tdigestRank :: RedisCtx m f => ByteString -> NonEmpty Double -> m (f [Integer])
- tdigestReset :: RedisCtx m f => ByteString -> m (f Status)
- tdigestRevrank :: RedisCtx m f => ByteString -> NonEmpty Double -> m (f [Integer])
- tdigestTrimmedMean :: RedisCtx m f => ByteString -> Double -> Double -> m (f Double)
- data JSONGetOpts = JSONGetOpts {}
- defaultJSONGetOpts :: JSONGetOpts
- data JSONSetCondition
- data JSONSetFPHA
- data JSONSetOpts = JSONSetOpts {}
- defaultJSONSetOpts :: JSONSetOpts
- data JSONArrIndexOpts
- defaultJSONArrIndexOpts :: JSONArrIndexOpts
- jsonGetOptsToArgs :: JSONGetOpts -> [ByteString]
- jsonSetOptsToArgs :: JSONSetOpts -> [ByteString]
- jsonArrIndexOptsToArgs :: JSONArrIndexOpts -> [ByteString]
- jsonArrappend :: RedisCtx m f => ByteString -> ByteString -> NonEmpty ByteString -> m (f Reply)
- jsonArrindex :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Reply)
- jsonArrindexOpts :: RedisCtx m f => ByteString -> ByteString -> ByteString -> JSONArrIndexOpts -> m (f Reply)
- jsonArrlen :: RedisCtx m f => ByteString -> m (f Reply)
- jsonArrlenAt :: RedisCtx m f => ByteString -> ByteString -> m (f Reply)
- jsonArrinsert :: RedisCtx m f => ByteString -> ByteString -> Integer -> NonEmpty ByteString -> m (f Reply)
- jsonArrpop :: RedisCtx m f => ByteString -> m (f Reply)
- jsonArrpopAt :: RedisCtx m f => ByteString -> ByteString -> m (f Reply)
- jsonArrpopAtIndex :: RedisCtx m f => ByteString -> ByteString -> Integer -> m (f Reply)
- jsonArrtrim :: RedisCtx m f => ByteString -> ByteString -> Integer -> Integer -> m (f Reply)
- jsonClear :: RedisCtx m f => ByteString -> m (f Integer)
- jsonClearAt :: RedisCtx m f => ByteString -> ByteString -> m (f Integer)
- jsonDebug :: RedisCtx m f => m (f Reply)
- jsonDebugMemory :: RedisCtx m f => ByteString -> m (f Reply)
- jsonDebugMemoryAt :: RedisCtx m f => ByteString -> ByteString -> m (f Reply)
- jsonDel :: RedisCtx m f => ByteString -> m (f Integer)
- jsonDelAt :: RedisCtx m f => ByteString -> ByteString -> m (f Integer)
- jsonForget :: RedisCtx m f => ByteString -> m (f Integer)
- jsonForgetAt :: RedisCtx m f => ByteString -> ByteString -> m (f Integer)
- jsonGet :: RedisCtx m f => ByteString -> m (f (Maybe ByteString))
- jsonGetOpts :: RedisCtx m f => ByteString -> JSONGetOpts -> m (f (Maybe ByteString))
- jsonMerge :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Status)
- jsonMget :: RedisCtx m f => NonEmpty ByteString -> ByteString -> m (f [Maybe ByteString])
- jsonMset :: RedisCtx m f => NonEmpty (ByteString, ByteString, ByteString) -> m (f Status)
- jsonNumincrby :: RedisCtx m f => ByteString -> ByteString -> Double -> m (f Reply)
- jsonNummultby :: RedisCtx m f => ByteString -> ByteString -> Double -> m (f Reply)
- jsonObjkeys :: RedisCtx m f => ByteString -> m (f Reply)
- jsonObjkeysAt :: RedisCtx m f => ByteString -> ByteString -> m (f Reply)
- jsonObjlen :: RedisCtx m f => ByteString -> m (f Reply)
- jsonObjlenAt :: RedisCtx m f => ByteString -> ByteString -> m (f Reply)
- jsonResp :: RedisCtx m f => ByteString -> m (f Reply)
- jsonRespAt :: RedisCtx m f => ByteString -> ByteString -> m (f Reply)
- jsonSet :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f (Maybe Status))
- jsonSetOpts :: RedisCtx m f => ByteString -> ByteString -> ByteString -> JSONSetOpts -> m (f (Maybe Status))
- jsonStrappend :: RedisCtx m f => ByteString -> ByteString -> m (f Reply)
- jsonStrappendAt :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Reply)
- jsonToggle :: RedisCtx m f => ByteString -> ByteString -> m (f Reply)
- jsonType :: RedisCtx m f => ByteString -> m (f Reply)
- jsonTypeAt :: RedisCtx m f => ByteString -> ByteString -> m (f Reply)
- countArgs :: [a] -> ByteString
- data FTOn
- data FTIndexAllMode
- data FTFieldIdentifier
- data FTSortable
- data FTCommonFieldOpts = FTCommonFieldOpts {}
- defaultFTCommonFieldOpts :: FTCommonFieldOpts
- data FTTextFieldOpts = FTTextFieldOpts {}
- defaultFTTextFieldOpts :: FTTextFieldOpts
- data FTTagFieldOpts = FTTagFieldOpts {}
- defaultFTTagFieldOpts :: FTTagFieldOpts
- data FTGeoShapeFieldOpts = FTGeoShapeFieldOpts {}
- defaultFTGeoShapeFieldOpts :: FTGeoShapeFieldOpts
- data FTVectorFieldOpts = FTVectorFieldOpts {}
- data FTCreateField
- = FTCreateTextField FTFieldIdentifier FTTextFieldOpts
- | FTCreateTagField FTFieldIdentifier FTTagFieldOpts
- | FTCreateNumericField FTFieldIdentifier FTCommonFieldOpts
- | FTCreateGeoField FTFieldIdentifier FTCommonFieldOpts
- | FTCreateGeoShapeField FTFieldIdentifier FTGeoShapeFieldOpts
- | FTCreateVectorField FTFieldIdentifier FTVectorFieldOpts
- data FTCreateOpts = FTCreateOpts {
- ftCreateOn :: Maybe FTOn
- ftCreateIndexAll :: Maybe FTIndexAllMode
- ftCreatePrefixes :: [ByteString]
- ftCreateFilter :: Maybe ByteString
- ftCreateLanguage :: Maybe ByteString
- ftCreateLanguageField :: Maybe ByteString
- ftCreateScore :: Maybe Double
- ftCreateScoreField :: Maybe ByteString
- ftCreatePayloadField :: Maybe ByteString
- ftCreateMaxTextFields :: Bool
- ftCreateTemporarySeconds :: Maybe Double
- ftCreateNoOffsets :: Bool
- ftCreateNoHl :: Bool
- ftCreateNoFields :: Bool
- ftCreateNoFreqs :: Bool
- ftCreateStopwords :: Maybe [ByteString]
- ftCreateSkipInitialScan :: Bool
- defaultFTCreateOpts :: FTCreateOpts
- data FTAlterOpts = FTAlterOpts {}
- defaultFTAlterOpts :: FTAlterOpts
- data FTExplainOpts = FTExplainOpts {}
- defaultFTExplainOpts :: FTExplainOpts
- data FTSearchContentMode
- data FTSearchScoreMode
- data FTSearchPayloadMode
- data FTSearchSortKeysMode
- data FTReturnField
- data FTSummarizeOpts = FTSummarizeOpts {}
- defaultFTSummarizeOpts :: FTSummarizeOpts
- data FTHighlightOpts = FTHighlightOpts {}
- defaultFTHighlightOpts :: FTHighlightOpts
- data FTNumericFilter = FTNumericFilter {}
- data FTGeoFilter = FTGeoFilter {}
- data FTSortBy = FTSortBy {}
- data FTSearchOpts = FTSearchOpts {
- ftSearchContentMode :: FTSearchContentMode
- ftSearchVerbatim :: Bool
- ftSearchNoStopWords :: Bool
- ftSearchScoreMode :: FTSearchScoreMode
- ftSearchPayloadMode :: FTSearchPayloadMode
- ftSearchSortKeysMode :: FTSearchSortKeysMode
- ftSearchNumericFilters :: [FTNumericFilter]
- ftSearchGeoFilters :: [FTGeoFilter]
- ftSearchInKeys :: [ByteString]
- ftSearchInFields :: [ByteString]
- ftSearchReturnFields :: [FTReturnField]
- ftSearchSummarize :: Maybe FTSummarizeOpts
- ftSearchHighlight :: Maybe FTHighlightOpts
- ftSearchSlop :: Maybe Integer
- ftSearchTimeout :: Maybe Integer
- ftSearchInOrder :: Bool
- ftSearchLanguage :: Maybe ByteString
- ftSearchExpander :: Maybe ByteString
- ftSearchScorer :: Maybe ByteString
- ftSearchPayload :: Maybe ByteString
- ftSearchSortBy :: Maybe FTSortBy
- ftSearchLimit :: Maybe (Integer, Integer)
- ftSearchParams :: [(ByteString, ByteString)]
- ftSearchDialect :: Maybe Integer
- defaultFTSearchOpts :: FTSearchOpts
- data FTAggregateLoad
- data FTSortProperty = FTSortProperty {}
- data FTReduce = FTReduce {}
- data FTGroupBy = FTGroupBy {}
- data FTApply = FTApply {}
- data FTCursorOpts = FTCursorOpts {}
- defaultFTCursorOpts :: FTCursorOpts
- data FTAggregateOpts = FTAggregateOpts {
- ftAggregateVerbatim :: Bool
- ftAggregateLoad :: Maybe FTAggregateLoad
- ftAggregateTimeout :: Maybe Integer
- ftAggregateGroupBy :: [FTGroupBy]
- ftAggregateSortBy :: Maybe (NonEmpty FTSortProperty, Maybe Integer)
- ftAggregateApply :: [FTApply]
- ftAggregateLimit :: Maybe (Integer, Integer)
- ftAggregateFilter :: Maybe ByteString
- ftAggregateCursor :: Maybe FTCursorOpts
- ftAggregateParams :: [(ByteString, ByteString)]
- ftAggregateDialect :: Maybe Integer
- defaultFTAggregateOpts :: FTAggregateOpts
- data FTHybridSearchClause = FTHybridSearchClause {}
- data FTHybridVectorQuery
- = FTHybridKnn { }
- | FTHybridRange { }
- data FTHybridVSimClause = FTHybridVSimClause {}
- data FTHybridCombine
- = FTHybridCombineRRF { }
- | FTHybridCombineLinear { }
- data FTHybridSort
- data FTHybridLoad
- data FTHybridOpts = FTHybridOpts {
- ftHybridCombine :: Maybe FTHybridCombine
- ftHybridLimit :: Maybe (Integer, Integer)
- ftHybridSorting :: Maybe FTHybridSort
- ftHybridParams :: [(ByteString, ByteString)]
- ftHybridTimeout :: Maybe Integer
- ftHybridFormat :: Maybe ByteString
- ftHybridLoad :: Maybe FTHybridLoad
- ftHybridGroupBy :: [FTGroupBy]
- ftHybridApply :: [FTApply]
- ftHybridFilter :: Maybe ByteString
- ftHybridDialect :: Maybe Integer
- defaultFTHybridOpts :: FTHybridOpts
- data FTProfileQueryType
- data FTProfileOpts = FTProfileOpts {}
- defaultFTProfileOpts :: FTProfileOpts
- data FTSpellcheckTermsMode
- data FTSpellcheckOpts = FTSpellcheckOpts {}
- defaultFTSpellcheckOpts :: FTSpellcheckOpts
- data FTSugAddOpts
- data FTCursorReadOpts = FTCursorReadOpts {}
- defaultFTCursorReadOpts :: FTCursorReadOpts
- fieldIdentifierToArgs :: FTFieldIdentifier -> [ByteString]
- sortableToArgs :: FTSortable -> [ByteString]
- commonFieldOptsToArgs :: FTCommonFieldOpts -> [ByteString]
- createFieldToArgs :: FTCreateField -> [ByteString]
- ftCreateOptsToArgs :: FTCreateOpts -> [ByteString]
- ftAlterOptsToArgs :: FTAlterOpts -> [ByteString]
- ftExplainOptsToArgs :: FTExplainOpts -> [ByteString]
- returnFieldToArgs :: FTReturnField -> [ByteString]
- summarizeOptsToArgs :: FTSummarizeOpts -> [ByteString]
- highlightOptsToArgs :: FTHighlightOpts -> [ByteString]
- numericFilterToArgs :: FTNumericFilter -> [ByteString]
- geoFilterToArgs :: FTGeoFilter -> [ByteString]
- sortByToArgs :: FTSortBy -> [ByteString]
- ftSearchOptsToArgs :: FTSearchOpts -> [ByteString]
- aggregateLoadToArgs :: FTAggregateLoad -> [ByteString]
- sortPropertyToArgs :: FTSortProperty -> [ByteString]
- reduceToArgs :: FTReduce -> [ByteString]
- groupByToArgs :: FTGroupBy -> [ByteString]
- applyToArgs :: FTApply -> [ByteString]
- cursorOptsToArgs :: FTCursorOpts -> [ByteString]
- ftAggregateOptsToArgs :: FTAggregateOpts -> [ByteString]
- hybridVectorQueryToArgs :: FTHybridVectorQuery -> [ByteString]
- hybridSearchClauseToArgs :: FTHybridSearchClause -> [ByteString]
- hybridVSimClauseToArgs :: FTHybridVSimClause -> [ByteString]
- hybridCombineToArgs :: FTHybridCombine -> [ByteString]
- hybridSortToArgs :: FTHybridSort -> [ByteString]
- hybridLoadToArgs :: FTHybridLoad -> [ByteString]
- ftHybridOptsToArgs :: FTHybridOpts -> [ByteString]
- ftProfileOptsToArgs :: FTProfileOpts -> [ByteString]
- spellcheckTermsModeToArgs :: FTSpellcheckTermsMode -> [ByteString]
- ftSpellcheckOptsToArgs :: FTSpellcheckOpts -> [ByteString]
- ftSugAddOptsToArgs :: FTSugAddOpts -> [ByteString]
- ftCursorReadOptsToArgs :: FTCursorReadOpts -> [ByteString]
- ftList :: RedisCtx m f => m (f [ByteString])
- ftAggregate :: RedisCtx m f => ByteString -> ByteString -> m (f Reply)
- ftAggregateOpts :: RedisCtx m f => ByteString -> ByteString -> FTAggregateOpts -> m (f Reply)
- ftAliasAdd :: RedisCtx m f => ByteString -> ByteString -> m (f Status)
- ftAliasDel :: RedisCtx m f => ByteString -> m (f Status)
- ftAliasUpdate :: RedisCtx m f => ByteString -> ByteString -> m (f Status)
- ftAlter :: RedisCtx m f => ByteString -> FTCreateField -> m (f Status)
- ftAlterOpts :: RedisCtx m f => ByteString -> FTCreateField -> FTAlterOpts -> m (f Status)
- ftConfigSet :: RedisCtx m f => ByteString -> ByteString -> m (f Status)
- ftConfigGet :: RedisCtx m f => ByteString -> m (f Reply)
- ftCreate :: RedisCtx m f => ByteString -> NonEmpty FTCreateField -> m (f Status)
- ftCreateOpts :: RedisCtx m f => ByteString -> NonEmpty FTCreateField -> FTCreateOpts -> m (f Status)
- ftCursorDel :: RedisCtx m f => ByteString -> Integer -> m (f Status)
- ftCursorRead :: RedisCtx m f => ByteString -> Integer -> m (f Reply)
- ftCursorReadOpts :: RedisCtx m f => ByteString -> Integer -> FTCursorReadOpts -> m (f Reply)
- ftDictAdd :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f Integer)
- ftDictDel :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f Integer)
- ftDropIndex :: RedisCtx m f => ByteString -> m (f Status)
- ftDropIndexDeleteDocs :: RedisCtx m f => ByteString -> m (f Status)
- ftExplain :: RedisCtx m f => ByteString -> ByteString -> m (f ByteString)
- ftExplainOpts :: RedisCtx m f => ByteString -> ByteString -> FTExplainOpts -> m (f ByteString)
- ftHybrid :: RedisCtx m f => ByteString -> FTHybridSearchClause -> FTHybridVSimClause -> m (f Reply)
- ftHybridOpts :: RedisCtx m f => ByteString -> FTHybridSearchClause -> FTHybridVSimClause -> FTHybridOpts -> m (f Reply)
- ftInfo :: RedisCtx m f => ByteString -> m (f Reply)
- ftProfile :: RedisCtx m f => ByteString -> FTProfileQueryType -> ByteString -> m (f Reply)
- ftProfileOpts :: RedisCtx m f => ByteString -> FTProfileQueryType -> ByteString -> FTProfileOpts -> m (f Reply)
- ftSearch :: RedisCtx m f => ByteString -> ByteString -> m (f Reply)
- ftSearchOpts :: RedisCtx m f => ByteString -> ByteString -> FTSearchOpts -> m (f Reply)
- ftSpellcheck :: RedisCtx m f => ByteString -> ByteString -> m (f Reply)
- ftSpellcheckOpts :: RedisCtx m f => ByteString -> ByteString -> FTSpellcheckOpts -> m (f Reply)
- ftSugAdd :: RedisCtx m f => ByteString -> ByteString -> Double -> m (f Integer)
- ftSugAddOpts :: RedisCtx m f => ByteString -> ByteString -> Double -> FTSugAddOpts -> m (f Integer)
- ftSugDel :: RedisCtx m f => ByteString -> ByteString -> m (f Integer)
- ftSugLen :: RedisCtx m f => ByteString -> m (f Integer)
- ftTagVals :: RedisCtx m f => ByteString -> ByteString -> m (f [ByteString])
- data CMSInfo = CMSInfo {}
- data CMSMergeOpts
- cmsMergeOptsToArgs :: CMSMergeOpts -> [ByteString]
- cmsincrby :: RedisCtx m f => ByteString -> NonEmpty (ByteString, Integer) -> m (f [Integer])
- cmsinfo :: RedisCtx m f => ByteString -> m (f CMSInfo)
- cmsinitbydim :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f Status)
- cmsinitbyprob :: RedisCtx m f => ByteString -> Double -> Double -> m (f Status)
- cmsmerge :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f Status)
- cmsmergeOpts :: RedisCtx m f => ByteString -> CMSMergeOpts -> m (f Status)
- cmsmergeWeighted :: RedisCtx m f => ByteString -> NonEmpty (ByteString, Integer) -> m (f Status)
- cmsquery :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [Integer])
- data CFInfo = CFInfo {}
- data CFReserveOpts = CFReserveOpts {}
- defaultCFReserveOpts :: CFReserveOpts
- data CFInsertOpts = CFInsertOpts {}
- defaultCFInsertOpts :: CFInsertOpts
- data CFInsertResult
- cfReserveOptsToArgs :: CFReserveOpts -> [ByteString]
- cfInsertOptsToArgs :: CFInsertOpts -> [ByteString]
- cfadd :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
- cfaddnx :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
- cfcount :: RedisCtx m f => ByteString -> ByteString -> m (f Integer)
- cfdel :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
- cfexists :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
- cfinfo :: RedisCtx m f => ByteString -> m (f CFInfo)
- cfinsert :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [CFInsertResult])
- cfinsertOpts :: RedisCtx m f => ByteString -> NonEmpty ByteString -> CFInsertOpts -> m (f [CFInsertResult])
- cfinsertnx :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [CFInsertResult])
- cfinsertnxOpts :: RedisCtx m f => ByteString -> NonEmpty ByteString -> CFInsertOpts -> m (f [CFInsertResult])
- cfmexists :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [Bool])
- cfreserve :: RedisCtx m f => ByteString -> Integer -> m (f Status)
- cfreserveOpts :: RedisCtx m f => ByteString -> Integer -> CFReserveOpts -> m (f Status)
- data BFInfo = BFInfo {}
- data BFReserveOpts = BFReserveOpts {}
- defaultBFReserveOpts :: BFReserveOpts
- data BFInsertOpts = BFInsertOpts {}
- defaultBFInsertOpts :: BFInsertOpts
- bfReserveOptsToArgs :: BFReserveOpts -> [ByteString]
- bfInsertOptsToArgs :: BFInsertOpts -> [ByteString]
- bfadd :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
- bfcard :: RedisCtx m f => ByteString -> m (f Integer)
- bfexists :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
- bfinfo :: RedisCtx m f => ByteString -> m (f BFInfo)
- bfinfoCapacity :: RedisCtx m f => ByteString -> m (f [Integer])
- bfinfoSize :: RedisCtx m f => ByteString -> m (f [Integer])
- bfinfoFilters :: RedisCtx m f => ByteString -> m (f [Integer])
- bfinfoItems :: RedisCtx m f => ByteString -> m (f [Integer])
- bfinfoExpansion :: RedisCtx m f => ByteString -> m (f [Maybe Integer])
- bfinsert :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [Bool])
- bfinsertOpts :: RedisCtx m f => ByteString -> NonEmpty ByteString -> BFInsertOpts -> m (f [Bool])
- bfmadd :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [Bool])
- bfmexists :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [Bool])
- bfreserve :: RedisCtx m f => ByteString -> Double -> Integer -> m (f Status)
- bfreserveOpts :: RedisCtx m f => ByteString -> Double -> Integer -> BFReserveOpts -> m (f Status)
Connection
data SentinelConnectInfo Source #
Configuration of Sentinel hosts.
Constructors
| SentinelConnectInfo | |
Fields
| |
Instances
| Show SentinelConnectInfo Source # | |
Defined in Database.Redis.Sentinel Methods showsPrec :: Int -> SentinelConnectInfo -> ShowS # show :: SentinelConnectInfo -> String # showList :: [SentinelConnectInfo] -> ShowS # | |
data SentinelConnection Source #
runRedis with Sentinel support
runRedis :: SentinelConnection -> Redis (Either Reply a) -> IO (Either Reply a) Source #
Interact with a Redis datastore. See runRedis for details.
data RedisSentinelException Source #
Exception thrown by Database.Redis.Sentinel.
Constructors
| NoSentinels (NonEmpty (HostName, PortNumber)) | Thrown if no sentinel can be reached. |
Instances
| Exception RedisSentinelException Source # | |
Defined in Database.Redis.Sentinel | |
| Show RedisSentinelException Source # | |
Defined in Database.Redis.Sentinel Methods showsPrec :: Int -> RedisSentinelException -> ShowS # show :: RedisSentinelException -> String # showList :: [RedisSentinelException] -> ShowS # | |
Re-export Database.Redis
time :: RedisCtx m f => m (f (Integer, Integer)) Source #
Return the current server time (http://redis.io/commands/time). Since Redis 2.6.0
class RedisResult a where Source #
Instances
class RedisArg a where Source #
Methods
encode :: a -> ByteString Source #
Instances
Low-level representation of replies from the Redis server.
Constructors
| SingleLine ByteString | |
| Error ByteString | |
| Integer Integer | |
| Bulk (Maybe ByteString) | |
| MultiBulk (Maybe [Reply]) |
Instances
Options for the sort command.
Constructors
| SortOpts | |
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> m (f (Maybe ByteString)) |
Get the value of a key (http://redis.io/commands/get). Since Redis 1.0.0
data ClusterInfoResponseState Source #
Instances
| Show ClusterInfoResponseState Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> ClusterInfoResponseState -> ShowS # show :: ClusterInfoResponseState -> String # showList :: [ClusterInfoResponseState] -> ShowS # | |
| Eq ClusterInfoResponseState Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: ClusterInfoResponseState -> ClusterInfoResponseState -> Bool # (/=) :: ClusterInfoResponseState -> ClusterInfoResponseState -> Bool # | |
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> SortOpts | |
| -> m (f [ByteString]) |
Sort the elements in a list, set or sorted set (http://redis.io/commands/sort). The Redis command SORT is split up into sort, sortStore. Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | host |
| -> ByteString | port |
| -> ByteString | key |
| -> Integer | destinationDb |
| -> Integer | timeout |
| -> m (f Status) |
Atomically transfer a key from a Redis instance to another one (http://redis.io/commands/migrate). The Redis command MIGRATE is split up into migrate, migrateMultiple. Since Redis 2.6.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> ByteString | value |
| -> m (f Integer) |
O(1) Append a value to a key (http://redis.io/commands/append). Since Redis 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Source key |
| -> ByteString | Destination key |
| -> m (f Bool) |
Copies the value of a key to a new key (https://redis.io/commands/copy).
O(N) worst case for collections, where N is the number of nested items. O(1) for string values.
Since Redis 6.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | pattern |
| -> m (f [ByteString]) |
Find all keys matching the given pattern (http://redis.io/commands/keys). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Password. |
| -> m (f Status) |
O(N) where N is the number of passwords defined for the user.
Authenticates client to the server.
defaultHooks :: Hooks Source #
The default hooks.
Every hook is the identity function, so installing defaultHooks has no
effect on behavior.
Constructors
| Ok | |
| Pong | |
| Status ByteString |
Instances
| NFData Status Source # | |||||
Defined in Database.Redis.Types | |||||
| Generic Status Source # | |||||
Defined in Database.Redis.Types Associated Types
| |||||
| Show Status Source # | |||||
| Eq Status Source # | |||||
| RedisResult Status Source # | |||||
| type Rep Status Source # | |||||
Defined in Database.Redis.Types type Rep Status = D1 ('MetaData "Status" "Database.Redis.Types" "hedis-0.16.2-inplace" 'False) (C1 ('MetaCons "Ok" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Pong" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Status" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))) | |||||
Change the selected database for the current connection (http://redis.io/commands/select). Since Redis 1.0.0
save :: RedisCtx m f => m (f Status) Source #
Synchronously save the dataset to disk (http://redis.io/commands/save). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => Cursor | |
| -> m (f (Cursor, [ByteString])) | next cursor and values |
Incrementally iterate the keys space (http://redis.io/commands/scan). The Redis command SCAN is split up into scan, scanOpts. Since Redis 2.8.0
Arguments
| :: RedisCtx m f | |
| => Integer | Number of replicas to wait for. |
| -> Integer | Maximum time to wait in milliseconds. |
| -> m (f Integer) |
O(1) Wait for preceding writes to be acknowledged by a given number of replicas (https://redis.io/commands/wait).
Blocks until the asynchronous replication of all preceding write commands sent by the connection is completed.
Since Redis 3.0.0
data XReadResponse Source #
Constructors
| XReadResponse | |
Fields
| |
Instances
| Show XReadResponse Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> XReadResponse -> ShowS # show :: XReadResponse -> String # showList :: [XReadResponse] -> ShowS # | |
| Eq XReadResponse Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: XReadResponse -> XReadResponse -> Bool # (/=) :: XReadResponse -> XReadResponse -> Bool # | |
| RedisResult XReadResponse Source # | |
Defined in Database.Redis.ManualCommands | |
A collection of hook functions used by a connection.
Constructors
| Hooks | |
Fields | |
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> ByteString | newkey |
| -> m (f Status) |
Rename a key (http://redis.io/commands/rename). Since Redis 1.0.0
Does not return a error even if newkey existed.
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | db |
| -> m (f Bool) |
Move a key to another database (http://redis.io/commands/move). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> ByteString | value |
| -> m (f Status) |
data ConnectInfo Source #
Information for connnecting to a Redis server.
It is recommended to not use the ConnInfo data constructor directly.
Instead use defaultConnectInfo and update it with record syntax. For
example to connect to a password protected Redis server running on localhost
and listening to the default port:
myConnectInfo :: ConnectInfo
myConnectInfo = defaultConnectInfo {connectAuth = Just "secret"}
Or better yet, use parseConnectInfo to parse a URL.
Constructors
| ConnInfo | |
Fields
| |
Instances
| Show ConnectInfo Source # | |
Defined in Database.Redis.Connection Methods showsPrec :: Int -> ConnectInfo -> ShowS # show :: ConnectInfo -> String # showList :: [ConnectInfo] -> ShowS # | |
Context for normal command execution, outside of transactions. Use
runRedis to run actions of this type.
In this context, each result is wrapped in an Either to account for the
possibility of Redis returning an Error reply.
Instances
| MonadIO Redis Source # | |
Defined in Database.Redis.Core.Internal | |
| MonadCatch Redis Source # | |
Defined in Database.Redis.Core.Internal | |
| MonadMask Redis Source # | |
Defined in Database.Redis.Core.Internal Methods mask :: HasCallStack => ((forall a. Redis a -> Redis a) -> Redis b) -> Redis b # uninterruptibleMask :: HasCallStack => ((forall a. Redis a -> Redis a) -> Redis b) -> Redis b # generalBracket :: HasCallStack => Redis a -> (a -> ExitCase b -> Redis c) -> (a -> Redis b) -> Redis (b, c) # | |
| MonadThrow Redis Source # | |
Defined in Database.Redis.Core.Internal Methods throwM :: (HasCallStack, Exception e) => e -> Redis a # | |
| Applicative Redis Source # | |
| Functor Redis Source # | |
| Monad Redis Source # | |
| MonadFail Redis Source # | |
Defined in Database.Redis.Core.Internal | |
| MonadRedis Redis Source # | |
| MonadUnliftIO Redis Source # | |
Defined in Database.Redis.Core.Internal | |
| RedisCtx Redis (Either Reply) Source # | |
Defined in Database.Redis.Core Methods returnDecode :: RedisResult a => Reply -> Redis (Either Reply a) Source # | |
data ConnectAddr Source #
Constructors
| ConnectAddrHostPort HostName PortNumber | |
| ConnectAddrUnixSocket String |
Instances
| Show ConnectAddr Source # | |
Defined in Database.Redis.ConnectionContext Methods showsPrec :: Int -> ConnectAddr -> ShowS # show :: ConnectAddr -> String # showList :: [ConnectAddr] -> ShowS # | |
| Eq ConnectAddr Source # | |
Defined in Database.Redis.ConnectionContext | |
defaultConnectInfo :: ConnectInfo Source #
Default information for connecting:
connectAddr = ConnectAddrHostPort "localhost" 6379 -- Redis default port connectAuth = Nothing -- No password connectUsername = Nothing -- No user connectDatabase = 0 -- SELECT database 0 connectMaxConnections = 50 -- Up to 50 connections connectNumStripes = Just 1 -- A single stripe connectMaxIdleTime = 30 -- Keep open for 30 seconds connectTimeout = Nothing -- Don't add timeout logic connectTLSParams = Nothing -- Do not use TLS connectHooks = defaultHooks -- Do nothing connectPoolLabel = "" -- no label
parseConnectInfo :: String -> Either String ConnectInfo Source #
Parse a from a URL according to the Rules in Redis clientConnectInfo
Standalone Redis:
redis :// [[username :] password@] host [:port][/database]
>>>parseConnectInfo "redis://username:password@host:42/2"Right (ConnInfo {connectAddr = ConnectAddrHostPort "host" 42, connectAuth = Just "password", connectUsername = Just "username", connectDatabase = 2, connectMaxConnections = 50, connectNumStripes = Just 1, connectMaxIdleTime = 30s, connectTimeout = Nothing, connectTLSParams = Nothing, connectHooks = Hooks {...}, connectPoolLabel = ""})
>>>parseConnectInfo "redis://password@host:42/2"Right (ConnInfo {connectAddr = ConnectAddrHostPort "host" 42, connectAuth = Just "password", connectUsername = Nothing, connectDatabase = 2, connectMaxConnections = 50, connectNumStripes = Just 1, connectMaxIdleTime = 30s, connectTimeout = Nothing, connectTLSParams = Nothing, connectHooks = Hooks {...}, connectPoolLabel = ""})
TLS-enabled Redis:
rediss :// [[username :] password@] host [: port][/database]
Unix socket Redis:
redis-socket :// [[username :] password@]path [? [&database=database]
>>>parseConnectInfo "redis-socket://password@/tmp/redis.sock?database=2"Right (ConnInfo {connectAddr = ConnectAddrUnixSocket "/tmp/redis.sock", connectAuth = Just "password", connectUsername = Nothing, connectDatabase = 2, connectMaxConnections = 50, connectNumStripes = Just 1, connectMaxIdleTime = 30s, connectTimeout = Nothing, connectTLSParams = Nothing, connectHooks = Hooks {...}, connectPoolLabel = ""})
>>>parseConnectInfo "redis://username:password@host:42/db"Left "Invalid port: db"
The scheme is validated, to prevent mixing up configurations:
>>>parseConnectInfo "postgres://"Left "Wrong scheme postgres:"
Beyond that, all values are optional. Omitted values are taken from
:defaultConnectInfo
>>>parseConnectInfo "rediss://"Right (ConnInfo {connectAddr = ConnectAddrHostPort "localhost" 6379, connectAuth = Nothing, connectUsername = Nothing, connectDatabase = 0, connectMaxConnections = 50, connectNumStripes = Just 1, connectMaxIdleTime = 30s, connectTimeout = Nothing, connectTLSParams = Just (ClientParams ...), connectHooks = Hooks {...}, connectPoolLabel = ""})
disconnect :: Connection -> IO () Source #
Destroy all idle resources in the pool, works for all types of the connection.
checkedConnect :: ConnectInfo -> IO Connection Source #
Constructs a Connection pool to a Redis server designated by the
given ConnectInfo, then tests if the server is actually there.
Throws an ConnectError exception if the connection to the Redis server can't be
established.
withConnect :: (MonadMask m, MonadIO m) => ConnectInfo -> (Connection -> m c) -> m c Source #
Memory bracket around connect and disconnect.
withCheckedConnect :: ConnectInfo -> (Connection -> IO c) -> IO c Source #
Memory bracket around checkedConnect and disconnect
data ConnectError Source #
Constructors
| ConnectAuthError Reply | |
| ConnectSelectError Reply |
Instances
| Exception ConnectError Source # | |
Defined in Database.Redis.Connection Methods toException :: ConnectError -> SomeException # fromException :: SomeException -> Maybe ConnectError # displayException :: ConnectError -> String # backtraceDesired :: ConnectError -> Bool # | |
| Show ConnectError Source # | |
Defined in Database.Redis.Connection Methods showsPrec :: Int -> ConnectError -> ShowS # show :: ConnectError -> String # showList :: [ConnectError] -> ShowS # | |
| Eq ConnectError Source # | |
Defined in Database.Redis.Connection | |
connectCluster :: ConnectInfo -> IO Connection Source #
Constructs a ShardMap of connections to clustered nodes. The argument is
a ConnectInfo for any node in the cluster
Some Redis commands are currently not supported in cluster mode - CONFIG, AUTH - SCAN - MOVE, SELECT - RESET
checkedConnectCluster :: ConnectInfo -> IO Connection Source #
Constructs a Connection pool to a Redis cluster designated by the
given ConnectInfo, then tests if the server is actually there.
Throws an ClusterConnectError exception if the connection to the Redis server can't be
established.
newtype ClusterConnectError Source #
Constructors
| ClusterConnectError Reply |
Instances
| Exception ClusterConnectError Source # | |
Defined in Database.Redis.Connection | |
| Show ClusterConnectError Source # | |
Defined in Database.Redis.Connection Methods showsPrec :: Int -> ClusterConnectError -> ShowS # show :: ClusterConnectError -> String # showList :: [ClusterConnectError] -> ShowS # | |
| Eq ClusterConnectError Source # | |
Defined in Database.Redis.Connection Methods (==) :: ClusterConnectError -> ClusterConnectError -> Bool # (/=) :: ClusterConnectError -> ClusterConnectError -> Bool # | |
Encapsulates subscription changes. Use subscribe, unsubscribe,
psubscribe, punsubscribe or mempty to construct a value. Combine
values by using the Monoid interface, i.e. mappend and mconcat.
runRedisNonBlocking :: Connection -> Redis a -> IO (Maybe a) Source #
Interact with a Redis datastore specified by the given Connection, but return early
if acquiring from the connection pool would block.
Like runRedis, but if all connections in the Connection pool are used, it
immediately returns Nothing. This can be useful for logging purposes.
class MonadRedis m => RedisCtx (m :: Type -> Type) (f :: Type -> Type) | m -> f where Source #
This class captures the following behaviour: In a context m, a command
will return its result wrapped in a "container" of type f.
Please refer to the Command Type Signatures section of this page for more information.
Methods
returnDecode :: RedisResult a => Reply -> m (f a) Source #
Instances
| RedisCtx RedisTx Queued Source # | |
Defined in Database.Redis.Transactions Methods returnDecode :: RedisResult a => Reply -> RedisTx (Queued a) Source # | |
| RedisCtx Redis (Either Reply) Source # | |
Defined in Database.Redis.Core Methods returnDecode :: RedisResult a => Reply -> Redis (Either Reply a) Source # | |
class Monad m => MonadRedis (m :: Type -> Type) where Source #
Instances
| MonadRedis Redis Source # | |
| MonadRedis RedisTx Source # | |
| (MonadTrans t, MonadRedis m, Monad (t m)) => MonadRedis (t m) Source # | |
Defined in Database.Redis.Core | |
type SendRequestHook = ([ByteString] -> IO Reply) -> [ByteString] -> IO Reply Source #
A hook for sending commands to the server and receiving replies from the server.
This wraps the command-level request path used by most Redis commands.
type SendPubSubHook = ([ByteString] -> IO ()) -> [ByteString] -> IO () Source #
A hook for sending pub/sub messages to the server.
type CallbackHook = (Message -> IO PubSub) -> Message -> IO PubSub Source #
A hook for invoking callbacks with pub/sub messages.
type SendHook = (ByteString -> IO ()) -> ByteString -> IO () Source #
A hook for sending raw bytes to the server.
This sits below request rendering and can be used to observe the exact wire payload sent on the socket.
sendRequest :: (RedisCtx m f, RedisResult a) => [ByteString] -> m (f a) Source #
sendRequest can be used to implement commands from experimental
versions of Redis. An example of how to implement a command is given
below.
-- |Redis DEBUG OBJECT command debugObject :: ByteString ->Redis(EitherReplyByteString) debugObject key =sendRequest["DEBUG", "OBJECT", key]
data ConnectionLostException Source #
Constructors
| ConnectionLost |
Instances
| Exception ConnectionLostException Source # | |
| Show ConnectionLostException Source # | |
Defined in Database.Redis.ConnectionContext Methods showsPrec :: Int -> ConnectionLostException -> ShowS # show :: ConnectionLostException -> String # showList :: [ConnectionLostException] -> ShowS # | |
newtype ConnectTimeout Source #
Constructors
| ConnectTimeout ConnectPhase |
Instances
| Exception ConnectTimeout Source # | |
Defined in Database.Redis.ConnectionContext Methods toException :: ConnectTimeout -> SomeException # fromException :: SomeException -> Maybe ConnectTimeout # displayException :: ConnectTimeout -> String # backtraceDesired :: ConnectTimeout -> Bool # | |
| Show ConnectTimeout Source # | |
Defined in Database.Redis.ConnectionContext Methods showsPrec :: Int -> ConnectTimeout -> ShowS # show :: ConnectTimeout -> String # showList :: [ConnectTimeout] -> ShowS # | |
Instances
| Enum HashSlot Source # | |
Defined in Database.Redis.Cluster.HashSlot | |
| Num HashSlot Source # | |
Defined in Database.Redis.Cluster.HashSlot | |
| Integral HashSlot Source # | |
Defined in Database.Redis.Cluster.HashSlot | |
| Real HashSlot Source # | |
Defined in Database.Redis.Cluster.HashSlot Methods toRational :: HashSlot -> Rational # | |
| Show HashSlot Source # | |
| Eq HashSlot Source # | |
| Ord HashSlot Source # | |
Defined in Database.Redis.Cluster.HashSlot | |
keyToSlot :: ByteString -> HashSlot Source #
Compute the hashslot associated with a key
>>>keyToSlot "123"HashSlot 5970>>>keyToSlot "{123"HashSlot 2872>>>keyToSlot "{123}"HashSlot 5970>>>keyToSlot "{}123"HashSlot 7640>>>keyToSlot "{123}1{abc}"HashSlot 5970>>>keyToSlot "\00\01"HashSlot 4129
Arguments
| :: RedisCtx m f | |
| => ByteString | Password. |
| -> AuthOpts | Additional options. |
| -> m (f Status) |
O(N) where N is the number of passwords defined for the user.
Authenticates client to the server.
This method allows passing additional options.
Additional parameters for the auth command.
Constructors
| AuthOpts | |
Fields
| |
defaultAuthOpts :: AuthOpts Source #
Default options for AuthOpts
>>>defaultAuthOptsAuthOpts {authOptsUsername = Nothing}
Arguments
| :: RedisCtx m f | |
| => ByteString | message |
| -> m (f ByteString) |
Echo the given string (http://redis.io/commands/echo). Since Redis 1.0.0
ping :: RedisCtx m f => m (f Status) Source #
Ping the server (http://redis.io/commands/ping). Since Redis 1.0.0
quit :: RedisCtx m f => m (f Status) Source #
Close the connection (http://redis.io/commands/quit). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Source key |
| -> ByteString | Destination key |
| -> CopyOpts | Copy options |
| -> m (f Bool) |
Copies the value of a key to a new key (https://redis.io/commands/copy).
O(N) worst case for collections, where N is the number of nested items. O(1) for string values.
Since Redis 6.2.0
Options for the copy command.
Constructors
| CopyOpts | |
Fields
| |
defaultCopyOpts :: CopyOpts Source #
Redis default CopyOpts. Equivalent to omitting all optional parameters.
Arguments
| :: RedisCtx m f | |
| => NonEmpty ByteString | List of keys to delete. |
| -> m (f Integer) |
Delete a key (http://redis.io/commands/del). Returns a number of keys that were removed. Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> m (f ByteString) |
Return a serialized version of the value stored at the specified key (http://redis.io/commands/dump). Since Redis 2.6.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> m (f Bool) |
Determine if a key exists (http://redis.io/commands/exists). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | seconds |
| -> m (f Bool) |
Set a key's time to live in seconds (http://redis.io/commands/expire). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | seconds |
| -> ExpireOpts | |
| -> m (f Bool) |
data ExpireOpts Source #
Constructors
| ExpireOptsTime Condition | |
| ExpireOptsValue SizeCondition |
Instances
| RedisArg ExpireOpts Source # | |
Defined in Database.Redis.ManualCommands Methods encode :: ExpireOpts -> ByteString Source # | |
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | timestamp |
| -> m (f Bool) |
Set the expiration for a key as a UNIX timestamp (http://redis.io/commands/expireat). Since Redis 1.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | timestamp |
| -> ExpireOpts | |
| -> m (f Bool) |
Set the expiration for a key as a UNIX timestamp (http://redis.io/commands/expireat). Since Redis 1.2.0
data MigrateOpts Source #
Options for the migrate command.
Constructors
| MigrateOpts | |
Fields
| |
Instances
| Show MigrateOpts Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> MigrateOpts -> ShowS # show :: MigrateOpts -> String # showList :: [MigrateOpts] -> ShowS # | |
| Eq MigrateOpts Source # | |
Defined in Database.Redis.ManualCommands | |
defaultMigrateOpts :: MigrateOpts Source #
Redis default MigrateOpts. Equivalent to omitting all optional parameters.
MigrateOpts
{ migrateCopy = False -- remove the key from the local instance
, migrateReplace = False -- don't replace existing key on the remote instance
, migrateAuth = Nothing
}
Arguments
| :: RedisCtx m f | |
| => ByteString | host |
| -> ByteString | port |
| -> Integer | destinationDb |
| -> Integer | timeout |
| -> MigrateOpts | |
| -> [ByteString] | keys |
| -> m (f Status) |
Atomically transfer a key from a Redis instance to another one (http://redis.io/commands/migrate). The Redis command MIGRATE is split up into migrate, migrateMultiple. Since Redis 2.6.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> m (f Integer) |
Inspect the internals of Redis objects (http://redis.io/commands/object). The Redis command OBJECT is split up into objectRefcount, objectEncoding, objectIdletime. Since Redis 2.2.3
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> m (f ByteString) |
Inspect the internals of Redis objects (http://redis.io/commands/object). The Redis command OBJECT is split up into objectRefcount, objectEncoding, objectIdletime. Since Redis 2.2.3
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> m (f Integer) |
Inspect the internals of Redis objects (http://redis.io/commands/object). The Redis command OBJECT is split up into objectRefcount, objectEncoding, objectIdletime. Since Redis 2.2.3
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> m (f Bool) |
Remove the expiration from a key (http://redis.io/commands/persist). Since Redis 2.2.0
expiretime :: RedisCtx m f => ByteString -> m (f Integer) Source #
Returns the expiration time of a key as a Unix timestamp (https://redis.io/commands/expiretime).
Returns -2 if the key does not exist; -1 if the key exists but has no associated expiration.
O(1). Since Redis 7.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | milliseconds |
| -> m (f Bool) |
Set a key's time to live in milliseconds (http://redis.io/commands/pexpire). Since Redis 2.6.0
pexpiretime :: RedisCtx m f => ByteString -> m (f Integer) Source #
Returns the expiration time of a key as a Unix timestamp in milliseconds (https://redis.io/commands/pexpiretime).
Returns -2 if the key does not exist; -1 if the key exists but has no associated expiration.
O(1). Since Redis 7.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | millisecondsTimestamp |
| -> m (f Bool) |
Set the expiration for a key as a UNIX timestamp specified in milliseconds (http://redis.io/commands/pexpireat). Since Redis 2.6.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | millisecondsTimestamp |
| -> ExpireOpts | |
| -> m (f Bool) |
Set the expiration for a key as a UNIX timestamp specified in milliseconds (http://redis.io/commands/pexpireat). Since Redis 7.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key. |
| -> m (f Integer) |
O(1) Get the time to live for a key in milliseconds (http://redis.io/commands/pttl). Since Redis 2.6.0
This command returns -2 if the key does not exist.
This command returns -1 if the key exists but has no associated value
randomkey :: RedisCtx m f => m (f (Maybe ByteString)) Source #
Return a random key from the keyspace (http://redis.io/commands/randomkey). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> ByteString | newkey |
| -> m (f Bool) |
Rename a key, only if the new key does not exist (http://redis.io/commands/renamenx). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | timeToLive |
| -> ByteString | serializedValue |
| -> m (f Status) |
Create a key using the provided serialized value, previously obtained using DUMP (http://redis.io/commands/restore). The Redis command RESTORE is split up into restore, restoreReplace. Since Redis 2.6.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | timeToLive |
| -> ByteString | serializedValue |
| -> m (f Status) |
Create a key using the provided serialized value, previously obtained using DUMP (http://redis.io/commands/restore). The Redis command RESTORE is split up into restore, restoreReplace. Since Redis 2.6.0
defaultScanOpts :: ScanOpts Source #
Redis default ScanOpts. Equivalent to omitting all optional parameters.
ScanOpts
{ scanMatch = Nothing -- don't match any pattern
, scanCount = Nothing -- don't set any requirements on number elements returned (works like value COUNT 10)
}
Arguments
| :: RedisCtx m f | |
| => Cursor | |
| -> ScanOpts | |
| -> Maybe ByteString | types of the object to scan |
| -> m (f (Cursor, [ByteString])) | next cursor and values |
Incrementally iterate the keys space (http://redis.io/commands/scan). The Redis command SCAN is split up into scan, scanOpts. Since Redis 2.8.0
defaultSortOpts :: SortOpts Source #
Redis default SortOpts. Equivalent to omitting all optional parameters.
SortOpts
{ sortBy = Nothing -- omit the BY option
, sortLimit = (0,-1) -- return entire collection
, sortGet = [] -- omit the GET option
, sortOrder = Asc -- sort in ascending order
, sortAlpha = False -- sort numerically, not lexicographically
}
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> ByteString | destination |
| -> SortOpts | |
| -> m (f Integer) |
Sort the elements in a list, set or sorted set (http://redis.io/commands/sort). The Redis command SORT is split up into sort, sortStore. Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key to check. |
| -> m (f Integer) |
O(1) Get the time to live for a key (http://redis.io/commands/ttl). Since Redis 1.0.0
This command returns: * -2 if the key does not exist * -1 if the key exists but has no associated value
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> m (f RedisType) |
Determine the type stored at key (http://redis.io/commands/type). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> NonEmpty ByteString | field |
| -> m (f Integer) |
Delete one or more hash fields (http://redis.io/commands/hdel). Since Redis 2.0.0
data HashFieldExpirationStatus Source #
Constructors
| HashFieldExpirationNoSuchField | |
| HashFieldExpirationConditionNotMet | |
| HashFieldExpirationSet | |
| HashFieldExpirationDeleted |
Instances
| Show HashFieldExpirationStatus Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> HashFieldExpirationStatus -> ShowS # show :: HashFieldExpirationStatus -> String # showList :: [HashFieldExpirationStatus] -> ShowS # | |
| Eq HashFieldExpirationStatus Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: HashFieldExpirationStatus -> HashFieldExpirationStatus -> Bool # (/=) :: HashFieldExpirationStatus -> HashFieldExpirationStatus -> Bool # | |
| RedisResult HashFieldExpirationStatus Source # | |
Defined in Database.Redis.ManualCommands | |
data HashFieldExpirationInfo Source #
Constructors
| HashFieldExpirationInfoNoSuchField | |
| HashFieldExpirationInfoNoExpiration | |
| HashFieldExpirationInfo Integer |
Instances
| Show HashFieldExpirationInfo Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> HashFieldExpirationInfo -> ShowS # show :: HashFieldExpirationInfo -> String # showList :: [HashFieldExpirationInfo] -> ShowS # | |
| Eq HashFieldExpirationInfo Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: HashFieldExpirationInfo -> HashFieldExpirationInfo -> Bool # (/=) :: HashFieldExpirationInfo -> HashFieldExpirationInfo -> Bool # | |
| RedisResult HashFieldExpirationInfo Source # | |
Defined in Database.Redis.ManualCommands | |
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> ByteString | field |
| -> m (f Bool) |
Determine if a hash field exists (http://redis.io/commands/hexists). Since Redis 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the hash. |
| -> Integer | Seconds until expiration. |
| -> NonEmpty ByteString | List of fields to set expiration for. |
| -> m (f [HashFieldExpirationStatus]) |
Sets expiration for hash fields using relative time to expire in seconds (https://redis.io/commands/hexpire).
O(N) where N is the number of specified fields.
Set an expiration (TTL or time to live) on one or more fields of a given hash key. You must specify at least one field. Field(s) will automatically be deleted from the hash key when their TTLs expire.
Field expirations will only be cleared by commands that delete or overwrite the contents of the hash fields, including HDEL and HSET commands. This means that all the operations that conceptually alter the value stored at a hash key's field without replacing it with a new one will leave the TTL untouched.
You can clear the TTL using the hpersist command, which turns the hash field back into a persistent field.
Note that calling hexpirehpexpire with a zero TTL or hexpireathpexpireat with a time in the past will result in the hash field being deleted.
Since Redis 7.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the hash. |
| -> Integer | Seconds until expiration. |
| -> NonEmpty ByteString | List of fields to set expiration for. |
| -> ExpireOpts | Expiration options. |
| -> m (f [HashFieldExpirationStatus]) |
Sets expiration for hash fields using relative time to expire in seconds (https://redis.io/commands/hexpire).
O(N) where N is the number of specified fields.
Since Redis 7.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the hash. |
| -> Integer | Absolute Unix timestamp in seconds at which the hash fields will expire. |
| -> NonEmpty ByteString | List of fields to set expiration for. |
| -> m (f [HashFieldExpirationStatus]) |
Sets expiration for hash fields using an absolute Unix timestamp in seconds (https://redis.io/commands/hexpireat).
O(N) where N is the number of specified fields.
Since Redis 7.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the hash. |
| -> Integer | Absolute Unix timestamp in seconds at which the hash fields will expire. |
| -> NonEmpty ByteString | List of fields to set expiration for. |
| -> ExpireOpts | Expiration options. |
| -> m (f [HashFieldExpirationStatus]) |
Sets expiration for hash fields using an absolute Unix timestamp in seconds (https://redis.io/commands/hexpireat).
O(N) where N is the number of specified fields.
Since Redis 7.4.0
hexpiretime :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [HashFieldExpirationInfo]) Source #
Returns the expiration time of hash fields as a Unix timestamp in seconds (https://redis.io/commands/hexpiretime).
O(N) where N is the number of specified fields.
Since Redis 7.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> ByteString | field |
| -> m (f (Maybe ByteString)) |
Get the value of a hash field (http://redis.io/commands/hget). Since Redis 2.0.0
hgetdel :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [Maybe ByteString]) Source #
Returns the values associated with the specified fields in a hash and deletes those fields (https://redis.io/commands/hgetdel).
O(N) where N is the number of specified fields.
Since Redis 8.0.0
hgetex :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [Maybe ByteString]) Source #
Returns the values associated with the specified fields in a hash and optionally updates the key expiration (https://redis.io/commands/hgetex).
O(N) where N is the number of specified fields.
Since Redis 8.0.0
data HGetExOpts Source #
Constructors
| HGetExOpts | |
Fields | |
Instances
| Show HGetExOpts Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> HGetExOpts -> ShowS # show :: HGetExOpts -> String # showList :: [HGetExOpts] -> ShowS # | |
| Eq HGetExOpts Source # | |
Defined in Database.Redis.ManualCommands | |
hgetexOpts :: RedisCtx m f => ByteString -> NonEmpty ByteString -> HGetExOpts -> m (f [Maybe ByteString]) Source #
Returns the values associated with the specified fields in a hash and optionally updates the key expiration (https://redis.io/commands/hgetex).
O(N) where N is the number of specified fields.
Since Redis 8.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> m (f [(ByteString, ByteString)]) |
Get all the fields and values in a hash (http://redis.io/commands/hgetall).
Since Redis 2.0.0.
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> ByteString | field |
| -> Int64 | increment |
| -> m (f Int64) |
Increment the integer value of a hash field by the given number (http://redis.io/commands/hincrby). Since Redis 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> ByteString | field |
| -> Double | increment |
| -> m (f Double) |
Increment the float value of a hash field by the given amount (http://redis.io/commands/hincrbyfloat). Since Redis 2.6.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> m (f [ByteString]) |
O(N) where N is size of the hash.
Get all the fields in a hash (http://redis.io/commands/hkeys).
Since Redis 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> m (f Integer) |
O(1) Get the number of fields in a hash (http://redis.io/commands/hlen).
Since Redis 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> NonEmpty ByteString | field |
| -> m (f [Maybe ByteString]) |
Get the values of all the given hash fields (http://redis.io/commands/hmget). Since Redis 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> NonEmpty (ByteString, ByteString) | fieldValue |
| -> m (f Status) |
Set multiple hash fields to multiple values (http://redis.io/commands/hmset).
Deprecated by Redis, consider using hset with multiple field-value pairs.
Since Redis 2.0.0
hrandfield :: RedisCtx m f => ByteString -> m (f (Maybe ByteString)) Source #
hrandfieldCount :: RedisCtx m f => ByteString -> Integer -> m (f [ByteString]) Source #
Returns one or more random fields from a hash (https://redis.io/commands/hrandfield).
O(N) where N is the number of fields returned.
If the provided count argument is positive, return an array of distinct fields. The array's length is either count or the hash's number of fields (HLEN), whichever is lower.
If called with a negative count, the behavior changes and the command is allowed to return the same field multiple times. In this case, the number of returned fields is the absolute value of the specified count.
Since Redis 6.2.0
hrandfieldCountWithValues :: RedisCtx m f => ByteString -> Integer -> m (f [(ByteString, ByteString)]) Source #
Returns one or more random fields and their values from a hash (https://redis.io/commands/hrandfield).
O(N) where N is the number of fields returned.
If the provided count argument is positive, return an array of distinct fields. The array's length is either count or the hash's number of fields (HLEN), whichever is lower.
If called with a negative count, the behavior changes and the command is allowed to return the same field multiple times. In this case, the number of returned fields is the absolute value of the specified count.
Since Redis 6.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Cursor | |
| -> m (f (Cursor, [(ByteString, ByteString)])) | next cursor and values |
Incrementally iterate hash fields and associated values (http://redis.io/commands/hscan). The Redis command HSCAN is split up into hscan, hscanOpts. Since Redis 2.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Cursor | |
| -> ScanOpts | |
| -> m (f (Cursor, [(ByteString, ByteString)])) | next cursor and values |
Incrementally iterate hash fields and associated values (http://redis.io/commands/hscan). The Redis command HSCAN is split up into hscan, hscanOpts. Since Redis 2.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the hash. |
| -> Integer | Milliseconds until expiration. |
| -> NonEmpty ByteString | List of fields to set expiration for. |
| -> m (f [HashFieldExpirationStatus]) |
Sets expiration for hash fields using relative time to expire in milliseconds (https://redis.io/commands/hpexpire).
O(N) where N is the number of specified fields.
Since Redis 7.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the hash. |
| -> Integer | Milliseconds until expiration. |
| -> NonEmpty ByteString | List of fields to set expiration for. |
| -> ExpireOpts | Expiration options. |
| -> m (f [HashFieldExpirationStatus]) |
Sets expiration for hash fields using relative time to expire in milliseconds (https://redis.io/commands/hpexpire).
O(N) where N is the number of specified fields.
Since Redis 7.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the hash. |
| -> Integer | Absolute Unix timestamp in milliseconds at which the hash fields will expire. |
| -> NonEmpty ByteString | List of fields to set expiration for. |
| -> m (f [HashFieldExpirationStatus]) |
Sets expiration for hash fields using an absolute Unix timestamp in milliseconds (https://redis.io/commands/hpexpireat).
O(N) where N is the number of specified fields.
Since Redis 7.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the hash. |
| -> Integer | Absolute Unix timestamp in milliseconds at which the hash fields will expire. |
| -> NonEmpty ByteString | List of fields to set expiration for. |
| -> ExpireOpts | Expiration options. |
| -> m (f [HashFieldExpirationStatus]) |
Sets expiration for hash fields using an absolute Unix timestamp in milliseconds (https://redis.io/commands/hpexpireat).
O(N) where N is the number of specified fields.
Since Redis 7.4.0
hpexpiretime :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [HashFieldExpirationInfo]) Source #
Returns the expiration time of hash fields as a Unix timestamp in milliseconds (https://redis.io/commands/hpexpiretime).
O(N) where N is the number of specified fields.
Since Redis 7.4.0
hpttl :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [HashFieldExpirationInfo]) Source #
Returns the TTL in milliseconds of hash fields (https://redis.io/commands/hpttl).
O(N) where N is the number of specified fields.
Since Redis 7.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> NonEmpty (ByteString, ByteString) | Values. |
| -> m (f Integer) |
Set the string value of a hash field (http://redis.io/commands/hset).
This command oveerides keys if they exist in the hash.
Since Redis 2.0.0
hsetex :: RedisCtx m f => ByteString -> NonEmpty (ByteString, ByteString) -> m (f Bool) Source #
Sets fields in a hash and optionally updates the key expiration (https://redis.io/commands/hsetex).
O(N) where N is the number of fields set.
Since Redis 8.0.0
data HSetExCondition Source #
Instances
| Show HSetExCondition Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> HSetExCondition -> ShowS # show :: HSetExCondition -> String # showList :: [HSetExCondition] -> ShowS # | |
| Eq HSetExCondition Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: HSetExCondition -> HSetExCondition -> Bool # (/=) :: HSetExCondition -> HSetExCondition -> Bool # | |
| RedisArg HSetExCondition Source # | |
Defined in Database.Redis.ManualCommands Methods encode :: HSetExCondition -> ByteString Source # | |
data HSetExOpts Source #
Constructors
| HSetExOpts | |
Instances
| Show HSetExOpts Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> HSetExOpts -> ShowS # show :: HSetExOpts -> String # showList :: [HSetExOpts] -> ShowS # | |
| Eq HSetExOpts Source # | |
Defined in Database.Redis.ManualCommands | |
hsetexOpts :: RedisCtx m f => ByteString -> NonEmpty (ByteString, ByteString) -> HSetExOpts -> m (f Bool) Source #
Sets fields in a hash and optionally updates the key expiration (https://redis.io/commands/hsetex).
O(N) where N is the number of fields set.
Since Redis 8.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> ByteString | field |
| -> ByteString | value |
| -> m (f Bool) |
Set the value of a hash field, only if the field does not exist (http://redis.io/commands/hsetnx). Since Redis 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> ByteString | field |
| -> m (f Integer) |
Get the length of the value of a hash field (http://redis.io/commands/hstrlen). Since Redis 3.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the hash. |
| -> NonEmpty ByteString | List of fields to get TTL for. |
| -> m (f [HashFieldExpirationInfo]) |
Returns the TTL in seconds of hash fields (https://redis.io/commands/httl).
O(N) where N is the number of specified fields.
Since Redis 7.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> m (f [ByteString]) |
Get all the values in a hash (http://redis.io/commands/hvals). Since Redis 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key. |
| -> NonEmpty ByteString | Value. |
| -> m (f Integer) |
O(1) Adds all the elements arguments to the HyperLogLog data structure stored at the variable name specified as first argument (http://redis.io/commands/pfadd). Since Redis 2.8.9
Arguments
| :: RedisCtx m f | |
| => NonEmpty ByteString | key |
| -> m (f Integer) |
Return the approximated cardinality of the set(s) observed by the HyperLogLog at key(s) (http://redis.io/commands/pfcount). Since Redis 2.8.9
Arguments
| :: RedisCtx m f | |
| => ByteString | destkey |
| -> [ByteString] | sourcekey |
| -> m (f ByteString) |
Merge N different HyperLogLogs into a single one (http://redis.io/commands/pfmerge). Since Redis 2.8.9
Arguments
| :: RedisCtx m f | |
| => [ByteString] | key |
| -> Integer | timeout |
| -> m (f (Maybe (ByteString, ByteString))) |
Remove and get the first element in a list, or block until one is available (http://redis.io/commands/blpop). Since Redis 2.0.0
Arguments
| :: RedisCtx m f | |
| => [ByteString] | key |
| -> Integer | timeout |
| -> m (f (Maybe (ByteString, ByteString))) |
Remove and get the first element in a list, or block until one is available (http://redis.io/commands/blpop). Since Redis 6.0.0
blmpop :: RedisCtx m f => Double -> NonEmpty ByteString -> ListDirection -> m (f (Maybe (ByteString, [ByteString]))) Source #
Pops one or more elements from the first non-empty list from a list of keys, or blocks until one is available (https://redis.io/commands/blmpop).
O(N+M) where N is the number of provided keys and M is the number of elements returned.
Since Redis 7.0.0
blmpopCount :: RedisCtx m f => Double -> NonEmpty ByteString -> ListDirection -> Integer -> m (f (Maybe (ByteString, [ByteString]))) Source #
Pops one or more elements from the first non-empty list from a list of keys, or blocks until one is available (https://redis.io/commands/blmpop).
O(N+M) where N is the number of provided keys and M is the number of elements returned.
Since Redis 7.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Source |
| -> ByteString | Destination |
| -> ListDirection | Direction where to get the element from in the source list |
| -> ListDirection | Direction where to push the element to in the destination list |
| -> Integer | |
| -> m (f (Maybe ByteString)) |
Move an element after taking it from one list and pushing it to another, or blocks until one is available (https://redis.io/commands/blmove).
In clustered environments source and destination keys must be in the same hash slot, which can be ensured by using hash tags (e.g. {tag}source and {tag}destination).
O(1)
Since Redis 6.2.0
data ListDirection Source #
Instances
| Show ListDirection Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> ListDirection -> ShowS # show :: ListDirection -> String # showList :: [ListDirection] -> ShowS # | |
| Eq ListDirection Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: ListDirection -> ListDirection -> Bool # (/=) :: ListDirection -> ListDirection -> Bool # | |
| RedisArg ListDirection Source # | |
Defined in Database.Redis.ManualCommands Methods encode :: ListDirection -> ByteString Source # | |
Arguments
| :: RedisCtx m f | |
| => NonEmpty ByteString | key |
| -> Integer | timeout |
| -> m (f (Maybe (ByteString, ByteString))) |
O(N) Remove and get the last element in a list, or block until one is available (http://redis.io/commands/brpop).
Since Redis 2.0.0
Arguments
| :: RedisCtx m f | |
| => [ByteString] | key |
| -> Double | timeout |
| -> m (f (Maybe (ByteString, ByteString))) |
O(N) Remove and get the last element in a list, or block until one is available (http://redis.io/commands/brpop).
Since Redis 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | source |
| -> ByteString | destination |
| -> Integer | timeout |
| -> m (f (Maybe ByteString)) |
Pop a value from a list, push it to another list and return it; or block until one is available (http://redis.io/commands/brpoplpush).
Since Redis 6.0 this command considered deprecated: it can be replaced by BLMOVE with the RIGHT and LEFT arguments when migrating or writing new code.
Since Redis 2.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key. |
| -> Integer | Index |
| -> m (f (Maybe ByteString)) |
Get an element from a list by its index (http://redis.io/commands/lindex). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> ByteString | pivot |
| -> ByteString | value |
| -> m (f Integer) |
Insert an element before or after another element in a list (http://redis.io/commands/linsert). The Redis command LINSERT is split up into linsertBefore, linsertAfter. Since Redis 2.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> ByteString | pivot |
| -> ByteString | value |
| -> m (f Integer) |
Insert an element before or after another element in a list (http://redis.io/commands/linsert). The Redis command LINSERT is split up into linsertBefore, linsertAfter. Since Redis 2.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> m (f Integer) |
Get the length of a list (http://redis.io/commands/llen). Since Redis 1.0.0
lmpop :: RedisCtx m f => NonEmpty ByteString -> ListDirection -> m (f (Maybe (ByteString, [ByteString]))) Source #
Pops one or more elements from the first non-empty list from a list of keys (https://redis.io/commands/lmpop).
O(N+M) where N is the number of provided keys and M is the number of elements returned.
Since Redis 7.0.0
lmpopCount :: RedisCtx m f => NonEmpty ByteString -> ListDirection -> Integer -> m (f (Maybe (ByteString, [ByteString]))) Source #
Pops one or more elements from the first non-empty list from a list of keys (https://redis.io/commands/lmpop).
O(N+M) where N is the number of provided keys and M is the number of elements returned.
Since Redis 7.0.0
lpos :: RedisCtx m f => ByteString -> ByteString -> m (f (Maybe Integer)) Source #
Returns the index of the first matching element in a list (https://redis.io/commands/lpos).
O(N) where N is the number of elements in the list, for the average case. When searching for elements near the head or the tail of the list, or when the MAXLEN option is provided, the command may run in constant time.
Since Redis 6.0.6
lposOpts :: RedisCtx m f => ByteString -> ByteString -> LPosOpts -> m (f (Maybe Integer)) Source #
Returns the index of the first matching element in a list (https://redis.io/commands/lpos).
O(N) where N is the number of elements in the list, for the average case. When searching for elements near the head or the tail of the list, or when the MAXLEN option is provided, the command may run in constant time.
Since Redis 6.0.6
lposCount :: RedisCtx m f => ByteString -> ByteString -> Integer -> m (f [Integer]) Source #
Returns the indexes of matching elements in a list (https://redis.io/commands/lpos).
O(N) where N is the number of elements in the list, for the average case. When searching for elements near the head or the tail of the list, or when the MAXLEN option is provided, the command may run in constant time.
Since Redis 6.0.6
lposCountOpts :: RedisCtx m f => ByteString -> ByteString -> Integer -> LPosOpts -> m (f [Integer]) Source #
Returns the indexes of matching elements in a list (https://redis.io/commands/lpos).
O(N) where N is the number of elements in the list, for the average case. When searching for elements near the head or the tail of the list, or when the MAXLEN option is provided, the command may run in constant time.
Since Redis 6.0.6
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> m (f (Maybe ByteString)) |
Remove and get the first element in a list (http://redis.io/commands/lpop). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | |
| -> m (f [ByteString]) |
Remove and get the first element in a list (http://redis.io/commands/lpop). The reply will consist of up to count elements, depending on the list's length. Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Source |
| -> ByteString | Destination |
| -> ListDirection | Direction where to get the element from in the source list |
| -> ListDirection | Direction where to push the element to in the destination list |
| -> m (f (Maybe ByteString)) |
Move an element after taking it from one list and pushing it to another (https://redis.io/commands/lmove).
In clustered environments source and destination keys must be in the same hash slot, which can be ensured by using hash tags (e.g. {tag}source and {tag}destination).
O(1)
Since Redis 6.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key |
| -> NonEmpty ByteString | Value |
| -> m (f Integer) |
Prepend one or multiple values to a list (http://redis.io/commands/lpush). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> NonEmpty ByteString | value |
| -> m (f Integer) |
Prepend a value to a list, only if the list exists (http://redis.io/commands/lpushx). Since Redis 2.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | start |
| -> Integer | stop |
| -> m (f [ByteString]) |
Get a range of elements from a list (http://redis.io/commands/lrange). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | count |
| -> ByteString | value |
| -> m (f Integer) |
Remove elements from a list (http://redis.io/commands/lrem). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | index |
| -> ByteString | value |
| -> m (f Status) |
Set the value of an element in a list by its index (http://redis.io/commands/lset). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | start |
| -> Integer | stop |
| -> m (f Status) |
Trim a list to the specified range (http://redis.io/commands/ltrim). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> m (f (Maybe ByteString)) |
Remove and get the last element in a list (http://redis.io/commands/rpop). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | |
| -> m (f [ByteString]) |
Remove and get the last element in a list (http://redis.io/commands/rpop).
The reply will consist of up to count elements, depending on the list's length.
Result will have no more than N arguments.
Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | source |
| -> ByteString | destination |
| -> m (f (Maybe ByteString)) |
Remove the last element in a list, prepend it to another list and return that element f it existed (http://redis.io/commands/rpoplpush). Since Redis 1.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> NonEmpty ByteString | value |
| -> m (f Integer) |
Append one or multiple values to a list (http://redis.io/commands/rpush). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> NonEmpty ByteString | value |
| -> m (f Integer) |
O(1) for each element added. Append a value to a list, only if the list exists (http://redis.io/commands/rpushx). Since Redis 2.2.0
Arguments
| :: (RedisCtx m f, RedisResult a) | |
| => ByteString | script |
| -> [ByteString] | keys |
| -> [ByteString] | args |
| -> m (f a) |
Execute a Lua script server side (http://redis.io/commands/eval). Since Redis 2.6.0
Arguments
| :: (RedisCtx m f, RedisResult a) | |
| => ByteString | base16-encoded sha1 hash of the script |
| -> [ByteString] | keys |
| -> [ByteString] | args |
| -> m (f a) |
fcall :: (RedisCtx m f, RedisResult a) => ByteString -> [ByteString] -> [ByteString] -> m (f a) Source #
Invokes a function (https://redis.io/commands/fcall).
Complexity depends on the function that is executed.
Since Redis 7.0.0
fcallReadonly :: (RedisCtx m f, RedisResult a) => ByteString -> [ByteString] -> [ByteString] -> m (f a) Source #
Invokes a read-only function (https://redis.io/commands/fcall_ro).
Complexity depends on the function that is executed.
Since Redis 7.0.0
functionHelp :: RedisCtx m f => m (f [ByteString]) Source #
Returns helpful text about FUNCTION subcommands (https://redis.io/commands/function-help).
O(1)
Since Redis 7.0.0
functionList :: RedisCtx m f => m (f Reply) Source #
Returns information about all libraries (https://redis.io/commands/function-list).
O(N) where N is the number of functions.
Since Redis 7.0.0
data FunctionListOpts Source #
Constructors
| FunctionListOpts | |
Fields | |
Instances
| Show FunctionListOpts Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> FunctionListOpts -> ShowS # show :: FunctionListOpts -> String # showList :: [FunctionListOpts] -> ShowS # | |
| Eq FunctionListOpts Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: FunctionListOpts -> FunctionListOpts -> Bool # (/=) :: FunctionListOpts -> FunctionListOpts -> Bool # | |
functionListOpts :: RedisCtx m f => FunctionListOpts -> m (f Reply) Source #
Returns information about all libraries (https://redis.io/commands/function-list).
O(N) where N is the number of functions.
Since Redis 7.0.0
scriptDebug :: RedisCtx m f => DebugMode -> m (f Bool) Source #
Set the debug mode for executed scripts (http://redis.io/commands/script-debug). Since Redis 3.2.0
Arguments
| :: RedisCtx m f | |
| => NonEmpty ByteString | script |
| -> m (f [Bool]) |
Check existence of scripts in the script cache (http://redis.io/commands/script-exists). Since Redis 2.6.0
scriptFlush :: RedisCtx m f => m (f Status) Source #
Remove all the scripts from the script cache (http://redis.io/commands/script-flush). Since Redis 2.6.0
scriptKill :: RedisCtx m f => m (f Status) Source #
Kill the script currently in execution (http://redis.io/commands/script-kill). Since Redis 2.6.0
Arguments
| :: RedisCtx m f | |
| => ByteString | script |
| -> m (f ByteString) |
Load the specified Lua script into the script cache (http://redis.io/commands/script-load). Since Redis 2.6.0
bgrewriteaof :: RedisCtx m f => m (f Status) Source #
Asynchronously rewrite the append-only file (http://redis.io/commands/bgrewriteaof). Since Redis 1.0.0
bgsave :: RedisCtx m f => m (f Status) Source #
Asynchronously save the dataset to disk (http://redis.io/commands/bgsave).
Since Redis 1.0.0
bgsaveSchedule :: RedisCtx m f => m (f Status) Source #
Asynchronously save the dataset to disk (http://redis.io/commands/bgsave).
Immediately returns OK when an AOF rewrite is in progress and schedule the background save to run at the next opportunity.
A client may bee able to check if the operation succeeded using the lastsave command
Since Redis 3.2.2
clientGetname :: RedisCtx m f => m (f (Maybe ByteString)) Source #
Get the current connection name (http://redis.io/commands/client-getname). Since Redis 2.6.9
clientId :: RedisCtx m f => m (f Integer) Source #
Get the current connection ID (http://redis.io/commands/client-id). Since Redis 5.0.0
clientList :: RedisCtx m f => m (f [ByteString]) Source #
Get the list of client connections (http://redis.io/commands/client-list). Since Redis 2.4.0
Stop processing commands from clients for some time (http://redis.io/commands/client-pause). Since Redis 2.9.50
clientReply :: RedisCtx m f => ReplyMode -> m (f Bool) Source #
Instruct the server whether to reply to commands (http://redis.io/commands/client-reply). Since Redis 3.2
clientUnpause :: RedisCtx m f => m (f Status) Source #
Resumes processing commands from paused clients (https://redis.io/commands/client-unpause).
O(N) where N is the number of paused clients.
Since Redis 6.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Connection Name. |
| -> m (f Status) |
Set the current connection name (http://redis.io/commands/client-setname). Since Redis 2.6.9
clientNoTouch :: RedisCtx m f => Bool -> m (f Status) Source #
The CLIENT NO-TOUCH command controls whether commands sent by the client will alter the LRULFU of the keys they access (<https:redis.iocommands/client-notouch>).
When turned on, the current client will not change LFU/LRU stats, unless it sends the TOUCH command.
When turned off, the client touches LFU/LRU stats just as a normal client.
O(1)
Since Redis 7.2.0
clientSetinfo :: RedisCtx m f => ClientSetInfoOpts -> m (f Status) Source #
The CLIENT SETINFO command assigns various info attributes to the current connection which are displayed in the output of CLIENT LIST and CLIENT INFO (https://redis.io/commands/client-setinfo).
O(1)
Since Redis 7.2.0
commandCount :: RedisCtx m f => m (f Integer) Source #
O(1) Get total number of Redis commands (http://redis.io/commands/command-count). Since Redis 2.8.13
Arguments
| :: RedisCtx m f | |
| => [ByteString] | commandName |
| -> m (f [ByteString]) |
Get array of specific Redis command details (http://redis.io/commands/command-info). Since Redis 2.8.13
commandList :: RedisCtx m f => m (f [ByteString]) Source #
Returns a list of command names (https://redis.io/commands/command-list).
O(N) where N is the total number of Redis commands.
Since Redis 7.0.0
data CommandListFilter Source #
Constructors
| CommandListFilterByModule ByteString | |
| CommandListFilterByAclCat ByteString | |
| CommandListFilterByPattern ByteString |
Instances
| Show CommandListFilter Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> CommandListFilter -> ShowS # show :: CommandListFilter -> String # showList :: [CommandListFilter] -> ShowS # | |
| Eq CommandListFilter Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: CommandListFilter -> CommandListFilter -> Bool # (/=) :: CommandListFilter -> CommandListFilter -> Bool # | |
Arguments
| :: RedisCtx m f | |
| => Maybe CommandListFilter | Optional filtering mode.
|
| -> m (f [ByteString]) |
Returns a list of command names (https://redis.io/commands/command-list).
O(N) where N is the total number of Redis commands.
Since Redis 7.0.0
data HotkeysMetric Source #
Constructors
| HotkeysMetricCPU | |
| HotkeysMetricNET |
Instances
| Show HotkeysMetric Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> HotkeysMetric -> ShowS # show :: HotkeysMetric -> String # showList :: [HotkeysMetric] -> ShowS # | |
| Eq HotkeysMetric Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: HotkeysMetric -> HotkeysMetric -> Bool # (/=) :: HotkeysMetric -> HotkeysMetric -> Bool # | |
| RedisArg HotkeysMetric Source # | |
Defined in Database.Redis.ManualCommands Methods encode :: HotkeysMetric -> ByteString Source # | |
data HotkeysStartOpts Source #
Constructors
| HotkeysStartOpts | |
Fields
| |
Instances
| Show HotkeysStartOpts Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> HotkeysStartOpts -> ShowS # show :: HotkeysStartOpts -> String # showList :: [HotkeysStartOpts] -> ShowS # | |
| Eq HotkeysStartOpts Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: HotkeysStartOpts -> HotkeysStartOpts -> Bool # (/=) :: HotkeysStartOpts -> HotkeysStartOpts -> Bool # | |
defaultHotkeysStartOpts :: HotkeysStartOpts Source #
Redis default HotkeysStartOpts. Equivalent to omitting all optional parameters.
data HotkeysSlotRange Source #
Constructors
| HotkeysSlotRange | |
Fields | |
Instances
| Show HotkeysSlotRange Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> HotkeysSlotRange -> ShowS # show :: HotkeysSlotRange -> String # showList :: [HotkeysSlotRange] -> ShowS # | |
| Eq HotkeysSlotRange Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: HotkeysSlotRange -> HotkeysSlotRange -> Bool # (/=) :: HotkeysSlotRange -> HotkeysSlotRange -> Bool # | |
| RedisResult HotkeysSlotRange Source # | |
Defined in Database.Redis.ManualCommands | |
data HotkeysGetResponse Source #
Constructors
| HotkeysGetResponse | |
Fields
| |
Instances
| Show HotkeysGetResponse Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> HotkeysGetResponse -> ShowS # show :: HotkeysGetResponse -> String # showList :: [HotkeysGetResponse] -> ShowS # | |
| Eq HotkeysGetResponse Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: HotkeysGetResponse -> HotkeysGetResponse -> Bool # (/=) :: HotkeysGetResponse -> HotkeysGetResponse -> Bool # | |
| RedisResult HotkeysGetResponse Source # | |
Defined in Database.Redis.ManualCommands | |
hotkeysGet :: RedisCtx m f => m (f HotkeysGetResponse) Source #
Returns tracking results and metadata from the current or most recent hotkeys tracking session (https://redis.io/commands/hotkeys-get).
O(K) where K is the number of hotkeys returned.
Since Redis 8.6.0
Arguments
| :: RedisCtx m f | |
| => NonEmpty HotkeysMetric | The metrics to track. The command automatically derives the `METRICS count` argument from the number of provided metrics. At least one metric must be specified. |
| -> m (f Status) |
Arguments
| :: RedisCtx m f | |
| => NonEmpty HotkeysMetric | The metrics to track. |
| -> HotkeysStartOpts | Additional tracking options. |
| -> m (f Status) |
hotkeysStop :: RedisCtx m f => m (f Status) Source #
hotkeysReset :: RedisCtx m f => m (f Status) Source #
Release the resources used for hotkey tracking (https://redis.io/commands/hotkeys-reset).
O(1)
Since Redis 8.6.0
Arguments
| :: RedisCtx m f | |
| => NonEmpty ByteString | parameter |
| -> m (f [(ByteString, ByteString)]) |
Get the value of a configuration parameter (http://redis.io/commands/config-get). Since Redis 2.0.0
configResetstat :: RedisCtx m f => m (f Status) Source #
Reset the stats returned by INFO (http://redis.io/commands/config-resetstat). Since Redis 2.0.0
configRewrite :: RedisCtx m f => m (f Status) Source #
Rewrite the configuration file with the in memory configuration (http://redis.io/commands/config-rewrite). Since Redis 2.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | parameter |
| -> ByteString | value |
| -> m (f Status) |
Set a configuration parameter to the given value (http://redis.io/commands/config-set). Since Redis 2.0.0
dbsize :: RedisCtx m f => m (f Integer) Source #
Return the number of keys in the selected database (http://redis.io/commands/dbsize). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> m (f ByteString) |
Get debugging information about a key (http://redis.io/commands/debug-object). Since Redis 1.0.0
flushall :: RedisCtx m f => m (f Status) Source #
Remove all keys from all databases (http://redis.io/commands/flushall). Since Redis 1.0.0
flushallOpts :: RedisCtx m f => FlushOpts -> m (f Status) Source #
Remove all keys from the current database (http://redis.io/commands/flushdb). Since Redis 6.2
Constructors
| FlushOptsSync | |
| FlushOptsAsync |
Instances
| RedisArg FlushOpts Source # | |
Defined in Database.Redis.ManualCommands Methods encode :: FlushOpts -> ByteString Source # | |
flushdb :: RedisCtx m f => m (f Status) Source #
Remove all keys from the current database (http://redis.io/commands/flushdb). Since Redis 1.0.0
flushdbOpts :: RedisCtx m f => FlushOpts -> m (f Status) Source #
Remove all keys from the current database (http://redis.io/commands/flushdb). Since Redis 6.2
info :: RedisCtx m f => m (f ByteString) Source #
Arguments
| :: RedisCtx m f | |
| => ByteString | section |
| -> m (f ByteString) |
Arguments
| :: RedisCtx m f | |
| => ByteString | host |
| -> ByteString | port |
| -> m (f Status) |
Make the server a slave of another instance, or promote it as master (http://redis.io/commands/slaveof). Deprecated in Redis, can be replaced by replicaif since redis 5.0 Since Redis 1.0.0
A single entry from the slowlog.
Constructors
| Slowlog | |
Fields
| |
slowlogLen :: RedisCtx m f => m (f Integer) Source #
slowlogReset :: RedisCtx m f => m (f Status) Source #
Arguments
| :: RedisCtx m f | |
| => ByteString | Key where set is stored. |
| -> NonEmpty ByteString | Member to add to the set. |
| -> m (f Integer) |
O(1) for each element added. Add one or more members to a set (http://redis.io/commands/sadd). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> m (f Integer) |
Get the number of members in a set (http://redis.io/commands/scard). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => NonEmpty ByteString | key |
| -> m (f [ByteString]) |
Subtract multiple sets (http://redis.io/commands/sdiff). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | destination |
| -> NonEmpty ByteString | key |
| -> m (f Integer) |
Subtract multiple sets and store the resulting set in a key (http://redis.io/commands/sdiffstore). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => NonEmpty ByteString | Keys. |
| -> m (f [ByteString]) |
Intersect multiple sets (http://redis.io/commands/sinter). Since Redis 1.0.0
sintercard :: RedisCtx m f => NonEmpty ByteString -> m (f Integer) Source #
Returns the cardinality of the intersection of multiple sets (https://redis.io/commands/sintercard).
O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.
In clustered environment, commands must operate on keys within the same hash slot.
Since Redis 7.0.0
data SintercardOpts Source #
Constructors
| SintercardOpts | |
Fields | |
Instances
| Show SintercardOpts Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> SintercardOpts -> ShowS # show :: SintercardOpts -> String # showList :: [SintercardOpts] -> ShowS # | |
| Eq SintercardOpts Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: SintercardOpts -> SintercardOpts -> Bool # (/=) :: SintercardOpts -> SintercardOpts -> Bool # | |
sintercardOpts :: RedisCtx m f => NonEmpty ByteString -> SintercardOpts -> m (f Integer) Source #
Returns the cardinality of the intersection of multiple sets (https://redis.io/commands/sintercard).
O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.
In clustered environment, commands must operate on keys within the same hash slot.
Since Redis 7.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | destination |
| -> NonEmpty ByteString | key |
| -> m (f Integer) |
Intersect multiple sets and store the resulting set in a key (http://redis.io/commands/sinterstore). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key. |
| -> ByteString | member |
| -> m (f Bool) |
Determine if a given value is a member of a set (http://redis.io/commands/sismember). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> m (f [ByteString]) |
Get all the members in a set (http://redis.io/commands/smembers). Since Redis 1.0.0
smismember :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [Bool]) Source #
Determines whether multiple members belong to a set (https://redis.io/commands/smismember).
O(N) where N is the number of elements being checked for membership.
Since Redis 6.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | source |
| -> ByteString | destination |
| -> ByteString | member |
| -> m (f Bool) |
Move a member from one set to another (http://redis.io/commands/smove). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> m (f (Maybe ByteString)) |
Remove and return one or multiple random members from a set (http://redis.io/commands/spop). The Redis command SPOP is split up into spop, spopN. Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | count |
| -> m (f [ByteString]) |
Remove and return one or multiple random members from a set (http://redis.io/commands/spop). The Redis command SPOP is split up into spop, spopN. Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> m (f (Maybe ByteString)) |
Get one or multiple random members from a set (http://redis.io/commands/srandmember). The Redis command SRANDMEMBER is split up into srandmember, srandmemberN. Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | count |
| -> m (f [ByteString]) |
Get one or multiple random members from a set (http://redis.io/commands/srandmember). The Redis command SRANDMEMBER is split up into srandmember, srandmemberN. Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the set. |
| -> NonEmpty ByteString | List of members to be removed. |
| -> m (f Integer) |
O(N) where N is the number of members to be removed.
Remove one or more members from a set (http://redis.io/commands/srem).
Returns the number of members that were removed from the seet, not including non existing elements.
Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Cursor | |
| -> m (f (Cursor, [ByteString])) | next cursor and values |
Incrementally iterate Set elements (http://redis.io/commands/sscan). The Redis command SSCAN is split up into sscan, sscanOpts. Since Redis 2.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Cursor | |
| -> ScanOpts | |
| -> m (f (Cursor, [ByteString])) | next cursor and values |
Incrementally iterate Set elements (http://redis.io/commands/sscan). The Redis command SSCAN is split up into sscan, sscanOpts. Since Redis 2.8.0
Arguments
| :: RedisCtx m f | |
| => NonEmpty ByteString | key |
| -> m (f [ByteString]) |
Add multiple sets (http://redis.io/commands/sunion). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | destination |
| -> NonEmpty ByteString | key |
| -> m (f Integer) |
Add multiple sets and store the resulting set in a key (http://redis.io/commands/sunionstore). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => NonEmpty ByteString | keys |
| -> Double | timeout |
| -> m (f (Maybe (ByteString, ByteString, Double))) |
Remove and return the member with the highest score from one or more sorted sets, or block until one is available (http://redis.io/commands/bzpopmax).
Since Redis 5.0.0
Arguments
| :: RedisCtx m f | |
| => NonEmpty ByteString | keys |
| -> Double | timeout |
| -> m (f (Maybe (ByteString, ByteString, Double))) |
Remove and return the member with the lowest score from one or more sorted sets, or block until one is available (http://redis.io/commands/bzpopmin).
Since Redis 5.0.0
Add one or more members to a sorted set, or update its score if it already exists (http://redis.io/commands/zadd). The Redis command ZADD is split up into zadd, zaddOpts. Since Redis 1.2.0
Constructors
| ZaddOpts | |
Fields
| |
defaultZaddOpts :: ZaddOpts Source #
Redis default ZaddOpts. Equivalent to omitting all optional parameters.
ZaddOpts
{ zaddCondition = Nothing -- omit NX and XX options
, zaddChange = False -- don't modify the return value from the number of new elements added, to the total number of elements changed
, zaddIncrement = False -- don't add like ZINCRBY
, zaddSizeCondition = Nothing -- omit GT and LT options
}
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> [(Double, ByteString)] | scoreMember |
| -> m (f Integer) |
Add one or more members to a sorted set, or update its score if it already exists (http://redis.io/commands/zadd). The Redis command ZADD is split up into zadd, zaddOpts. Since Redis 1.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> [(Double, ByteString)] | scoreMember |
| -> ZaddOpts | options |
| -> m (f Integer) |
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> m (f Integer) |
O(1) Get the number of members in a sorted set (http://redis.io/commands/zcard). Since Redis 1.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Double | min |
| -> Double | max |
| -> m (f Integer) |
Count the members in a sorted set with scores within the given values (http://redis.io/commands/zcount). Since Redis 2.0.0
zdiff :: RedisCtx m f => NonEmpty ByteString -> m (f [ByteString]) Source #
Returns the difference between multiple sorted sets (https://redis.io/commands/zdiff).
O(L + (N - K)log(N)) worst case where $L$ is the total number of elements in all the sorted sets, N is the size of the first sorted set, and K is the size of the result set.
In clustered environment, commands must operate on keys within the same hash slot.
Since Redis 6.2.0
Arguments
| :: RedisCtx m f | |
| => NonEmpty ByteString | Sorted set keys. |
| -> m (f [(ByteString, Double)]) |
Returns the difference between multiple sorted sets with scores (https://redis.io/commands/zdiff).
O(L + (N - K)log(N)) worst case where $L$ is the total number of elements in all the sorted sets, N is the size of the first sorted set, and K is the size of the result set.
In clustered environment, commands must operate on keys within the same hash slot.
Since Redis 6.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Destination key. |
| -> NonEmpty ByteString | Sorted set keys. |
| -> m (f Integer) |
Stores the difference of multiple sorted sets in a key (https://redis.io/commands/zdiffstore).
O(L + (N - K)log(N)) worst case where $L$ is the total number of elements in all the sorted sets, N is the size of the first sorted set, and K is the size of the result set.
In clustered environment, commands must operate on keys within the same hash slot.
Keys that do not exist are considered to be empty sets.
If destination already exists, it is overwritten.
Since Redis 6.2.0
data SizeCondition Source #
Constructors
| CGT | Only update existing elements if the new score is greater than the current score. This flag doesn't prevent adding new elements. |
| CLT | Only update existing elements if the new score is less than the current score. This flag doesn't prevent adding new elements. |
Instances
| Show SizeCondition Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> SizeCondition -> ShowS # show :: SizeCondition -> String # showList :: [SizeCondition] -> ShowS # | |
| Eq SizeCondition Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: SizeCondition -> SizeCondition -> Bool # (/=) :: SizeCondition -> SizeCondition -> Bool # | |
| RedisArg SizeCondition Source # | |
Defined in Database.Redis.ManualCommands Methods encode :: SizeCondition -> ByteString Source # | |
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | increment |
| -> ByteString | member |
| -> m (f Double) |
O(log(N))
Increment the score of a member in a sorted set (http://redis.io/commands/zincrby).
Returns new score of the element.
Since Redis 1.2.0
data ZPopMinMax Source #
Instances
| Show ZPopMinMax Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> ZPopMinMax -> ShowS # show :: ZPopMinMax -> String # showList :: [ZPopMinMax] -> ShowS # | |
| Eq ZPopMinMax Source # | |
Defined in Database.Redis.ManualCommands | |
| RedisArg ZPopMinMax Source # | |
Defined in Database.Redis.ManualCommands Methods encode :: ZPopMinMax -> ByteString Source # | |
data ZPopResponse Source #
Constructors
| ZPopResponse | |
Fields
| |
Instances
| Show ZPopResponse Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> ZPopResponse -> ShowS # show :: ZPopResponse -> String # showList :: [ZPopResponse] -> ShowS # | |
| Eq ZPopResponse Source # | |
Defined in Database.Redis.ManualCommands | |
| RedisResult ZPopResponse Source # | |
Defined in Database.Redis.ManualCommands | |
zmpop :: RedisCtx m f => NonEmpty ByteString -> ZPopMinMax -> m (f (Maybe ZPopResponse)) Source #
Removes and returns member-score pairs from the first non-empty sorted set from a list of keys (https://redis.io/commands/zmpop).
O(K) + O(Mlog(N)) where K is the number of provided keys, N is the number of elements in the sorted set, and M is the number of elements popped.
In clustered environment, commands must operate on keys within the same hash slot.
Since Redis 7.0.0
zmpopCount :: RedisCtx m f => NonEmpty ByteString -> ZPopMinMax -> Integer -> m (f (Maybe ZPopResponse)) Source #
Removes and returns member-score pairs from the first non-empty sorted set from a list of keys (https://redis.io/commands/zmpop).
O(K) + O(Mlog(N)) where K is the number of provided keys, N is the number of elements in the sorted set, and M is the number of elements popped.
In clustered environment, commands must operate on keys within the same hash slot.
Since Redis 7.0.0
bzmpop :: RedisCtx m f => Double -> NonEmpty ByteString -> ZPopMinMax -> m (f (Maybe ZPopResponse)) Source #
Removes and returns member-score pairs from the first non-empty sorted set from a list of keys, or blocks until one is available (https://redis.io/commands/bzmpop).
O(K) + O(Mlog(N)) where K is the number of provided keys, N is the number of elements in the sorted set, and M is the number of elements popped.
In clustered environment, commands must operate on keys within the same hash slot.
Since Redis 7.0.0
bzmpopCount :: RedisCtx m f => Double -> NonEmpty ByteString -> ZPopMinMax -> Integer -> m (f (Maybe ZPopResponse)) Source #
Removes and returns member-score pairs from the first non-empty sorted set from a list of keys, or blocks until one is available (https://redis.io/commands/bzmpop).
O(K) + O(Mlog(N)) where K is the number of provided keys, N is the number of elements in the sorted set, and M is the number of elements popped.
In clustered environment, commands must operate on keys within the same hash slot.
Since Redis 7.0.0
data ZAggregateOpts Source #
Constructors
| ZAggregateOpts | |
Fields
| |
Instances
| Show ZAggregateOpts Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> ZAggregateOpts -> ShowS # show :: ZAggregateOpts -> String # showList :: [ZAggregateOpts] -> ShowS # | |
| Eq ZAggregateOpts Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: ZAggregateOpts -> ZAggregateOpts -> Bool # (/=) :: ZAggregateOpts -> ZAggregateOpts -> Bool # | |
Arguments
| :: RedisCtx m f | |
| => NonEmpty ByteString | Sorted set keys. |
| -> m (f [ByteString]) |
Returns the intersection of multiple sorted sets (https://redis.io/commands/zinter).
O(NK) + O(Mlog(M)) worst case with N being the smallest input sorted set, K being the number of input sorted sets and M being the number of elements in the resulting sorted set.
In clustered environment, commands must operate on keys within the same hash slot.
Since Redis 6.2.0
Arguments
| :: RedisCtx m f | |
| => NonEmpty ByteString | Sorted set keys. |
| -> m (f [(ByteString, Double)]) |
Returns the intersection of multiple sorted sets with scores (https://redis.io/commands/zinter).
O(NK) + O(Mlog(M)) worst case with N being the smallest input sorted set, K being the number of input sorted sets and M being the number of elements in the resulting sorted set.
In clustered environment, commands must operate on keys within the same hash slot.
Since Redis 6.2.0
Arguments
| :: RedisCtx m f | |
| => NonEmpty ByteString | Sorted set keys. |
| -> ZAggregateOpts | |
| -> m (f [ByteString]) |
Returns the intersection of multiple sorted sets (https://redis.io/commands/zinter).
O(NK) + O(Mlog(M)) worst case with N being the smallest input sorted set, K being the number of input sorted sets and M being the number of elements in the resulting sorted set.
In clustered environment, commands must operate on keys within the same hash slot.
Since Redis 6.2.0
Arguments
| :: RedisCtx m f | |
| => NonEmpty ByteString | Sorted set keys. |
| -> ZAggregateOpts | |
| -> m (f [(ByteString, Double)]) |
Returns the intersection of multiple sorted sets with scores (https://redis.io/commands/zinter).
O(NK) + O(Mlog(M)) worst case with N being the smallest input sorted set, K being the number of input sorted sets and M being the number of elements in the resulting sorted set.
In clustered environment, commands must operate on keys within the same hash slot.
Since Redis 6.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | destination |
| -> NonEmpty ByteString | keys |
| -> Aggregate | |
| -> m (f Integer) |
Intersect multiple sorted sets and store the resulting sorted set in a new key (http://redis.io/commands/zinterstore). The Redis command ZINTERSTORE is split up into zinterstore, zinterstoreWeights. Since Redis 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | destination |
| -> NonEmpty (ByteString, Double) | weighted keys |
| -> Aggregate | |
| -> m (f Integer) |
Intersect multiple sorted sets and store the resulting sorted set in a new key (http://redis.io/commands/zinterstore). The Redis command ZINTERSTORE is split up into zinterstore, zinterstoreWeights. Since Redis 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> ByteString | min |
| -> ByteString | max |
| -> m (f Integer) |
Count the number of members in a sorted set between a given lexicographical range (http://redis.io/commands/zlexcount). Since Redis 2.8.9
zmscore :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [Maybe Double]) Source #
Returns the score of one or more members in a sorted set (https://redis.io/commands/zmscore).
O(N) where N is the number of members being requested.
Since Redis 6.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> m (f (Maybe (ByteString, Double))) |
Remove and return the member with the lowest score in a sorted set (http://redis.io/commands/zpopmin).
Since Redis 5.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> m (f (Maybe (ByteString, Double))) |
Remove and return the member with the highest score in a sorted set (http://redis.io/commands/zpopmax).
Since Redis 5.0.0
zrandmember :: RedisCtx m f => ByteString -> m (f (Maybe ByteString)) Source #
Returns a random member from a sorted set (https://redis.io/commands/zrandmember).
O(1) without the optional count argument.
Since Redis 6.2.0
zrandmemberN :: RedisCtx m f => ByteString -> Integer -> m (f [ByteString]) Source #
Returns one or more random members from a sorted set (https://redis.io/commands/zrandmember).
O(N) where N is the number of members returned.
Since Redis 6.2.0
zrandmemberWithscores :: RedisCtx m f => ByteString -> Integer -> m (f [(ByteString, Double)]) Source #
Returns one or more random members and their scores from a sorted set (https://redis.io/commands/zrandmember).
O(N) where N is the number of members returned.
Since Redis 6.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | start |
| -> Integer | stop |
| -> m (f [ByteString]) |
Return a range of members in a sorted set, by index (http://redis.io/commands/zrange). The Redis command ZRANGE is split up into zrange, zrangeWithscores. Since Redis 1.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | start |
| -> Integer | stop |
| -> m (f [(ByteString, Double)]) |
Return a range of members in a sorted set, by index (http://redis.io/commands/zrange). The Redis command ZRANGE is split up into zrange, zrangeWithscores. Since Redis 1.2.0
data ZRangeStoreRange Source #
Constructors
| ZRangeStoreByIndex Integer Integer | |
| ZRangeStoreByScore Double Double | |
| ZRangeStoreByLex (RangeLex ByteString) (RangeLex ByteString) |
Instances
| Show ZRangeStoreRange Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> ZRangeStoreRange -> ShowS # show :: ZRangeStoreRange -> String # showList :: [ZRangeStoreRange] -> ShowS # | |
| Eq ZRangeStoreRange Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: ZRangeStoreRange -> ZRangeStoreRange -> Bool # (/=) :: ZRangeStoreRange -> ZRangeStoreRange -> Bool # | |
data ZRangeStoreOpts Source #
Constructors
| ZRangeStoreOpts | |
Fields
| |
Instances
| Show ZRangeStoreOpts Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> ZRangeStoreOpts -> ShowS # show :: ZRangeStoreOpts -> String # showList :: [ZRangeStoreOpts] -> ShowS # | |
| Eq ZRangeStoreOpts Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: ZRangeStoreOpts -> ZRangeStoreOpts -> Bool # (/=) :: ZRangeStoreOpts -> ZRangeStoreOpts -> Bool # | |
zrangestore :: RedisCtx m f => ByteString -> ByteString -> Integer -> Integer -> m (f Integer) Source #
Stores a range of members from a sorted set in a destination key (https://redis.io/commands/zrangestore).
O(log(N) + M) with N being the number of elements in the sorted set and M the number of elements stored into the destination key.
Since Redis 6.2.0
zrangestoreOpts :: RedisCtx m f => ByteString -> ByteString -> ZRangeStoreRange -> ZRangeStoreOpts -> m (f Integer) Source #
Stores a range of members from a sorted set in a destination key (https://redis.io/commands/zrangestore).
O(log(N) + M) with N being the number of elements in the sorted set and M the number of elements stored into the destination key.
Since Redis 6.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> RangeLex ByteString | min |
| -> RangeLex ByteString | max |
| -> m (f [ByteString]) |
Return a range of members in a sorted set, by lexicographical range (http://redis.io/commands/zrangebylex). Since Redis 2.8.9
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> RangeLex ByteString | min |
| -> RangeLex ByteString | max |
| -> Integer | offset |
| -> Integer | count |
| -> m (f [ByteString]) |
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Double | min |
| -> Double | max |
| -> m (f [ByteString]) |
zrangebyscoreWithscores Source #
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Double | min |
| -> Double | max |
| -> m (f [(ByteString, Double)]) |
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Double | min |
| -> Double | max |
| -> Integer | offset |
| -> Integer | count |
| -> m (f [ByteString]) |
zrangebyscoreWithscoresLimit Source #
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Double | min |
| -> Double | max |
| -> Integer | offset |
| -> Integer | count |
| -> m (f [(ByteString, Double)]) |
Arguments
| :: RedisCtx m f | |
| => ByteString | Key.of the set. |
| -> ByteString | Member |
| -> m (f (Maybe Integer)) |
Determine the index of a member in a sorted set (http://redis.io/commands/zrank).
Since Redis 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the set. |
| -> ByteString | Member. |
| -> m (f (Maybe (Integer, Double))) |
Since Redis 7.2.0: fails on earlier versions
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> NonEmpty ByteString | member |
| -> m (f Integer) |
O(M*log(N)) with N number of elements in the sorted set, M number of elements to be
removed.
Removes one or more members from a sorted set (http://redis.io/commands/zrem).
Since Redis 1.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> ByteString | min |
| -> ByteString | max |
| -> m (f Integer) |
O(log(N)+M) with N being thee number of elements in thee sorted set and M the number
of elements removed by the operation.
Remove all members in a sorted set between the given lexicographical range (http://redis.io/commands/zremrangebylex).
Returns number of elements that were removed.
Since Redis 2.8.9
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | start |
| -> Integer | stop |
| -> m (f Integer) |
O(log(N)+M with N being the number of elements in the sorted set and M the number of elemnts removed by the operation.
Remove all members in a sorted set within the given indexes (http://redis.io/commands/zremrangebyrank).
Returns a number of elements that were removed.
Since Redis 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Double | min |
| -> Double | max |
| -> m (f Integer) |
O(log(N)+M) with N number of elements in the set, M number of elements to be removed.
Remove all members in a sorted set within the given scores (http://redis.io/commands/zremrangebyscore).
Returns a number of elements that were removed.
Since Redis 1.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | start |
| -> Integer | stop |
| -> m (f [ByteString]) |
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | start |
| -> Integer | stop |
| -> m (f [(ByteString, Double)]) |
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Double | max |
| -> Double | min |
| -> m (f [ByteString]) |
zrevrangebyscoreWithscores Source #
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Double | max |
| -> Double | min |
| -> m (f [(ByteString, Double)]) |
zrevrangebyscoreLimit Source #
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Double | max |
| -> Double | min |
| -> Integer | offset |
| -> Integer | count |
| -> m (f [ByteString]) |
zrevrangebyscoreWithscoresLimit Source #
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Double | max |
| -> Double | min |
| -> Integer | offset |
| -> Integer | count |
| -> m (f [(ByteString, Double)]) |
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> ByteString | member |
| -> m (f (Maybe Integer)) |
Determine the index of a member in a sorted set, with scores ordered from high to low (http://redis.io/commands/zrevrank). Since Redis 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> ByteString | member |
| -> m (f (Maybe (Integer, Double))) |
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Cursor | |
| -> m (f (Cursor, [(ByteString, Double)])) | next cursor and values |
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Cursor | |
| -> ScanOpts | |
| -> m (f (Cursor, [(ByteString, Double)])) | next cursor and values |
Arguments
| :: RedisCtx m f | |
| => ByteString | Key. |
| -> ByteString | Member. |
| -> m (f (Maybe Double)) |
Get the score associated with the given member in a sorted set (http://redis.io/commands/zscore). Since Redis 1.2.0
Arguments
| :: RedisCtx m f | |
| => NonEmpty ByteString | Sorted set keys. |
| -> m (f [ByteString]) |
Returns the union of multiple sorted sets (https://redis.io/commands/zunion).
O(N) + O(Mlog(M)) with N being the sum of the sizes of the input sorted sets, and M being the number of elements in the resulting sorted set.
Since Redis 6.2.0
zunionWithscores :: RedisCtx m f => NonEmpty ByteString -> m (f [(ByteString, Double)]) Source #
Returns the union of multiple sorted sets with scores (https://redis.io/commands/zunion).
O(N) + O(Mlog(M)) with N being the sum of the sizes of the input sorted sets, and M being the number of elements in the resulting sorted set.
Since Redis 6.2.0
zunionOpts :: RedisCtx m f => NonEmpty ByteString -> ZAggregateOpts -> m (f [ByteString]) Source #
Returns the union of multiple sorted sets (https://redis.io/commands/zunion).
O(N) + O(Mlog(M)) with N being the sum of the sizes of the input sorted sets, and M being the number of elements in the resulting sorted set.
Since Redis 6.2.0
zunionWithscoresOpts :: RedisCtx m f => NonEmpty ByteString -> ZAggregateOpts -> m (f [(ByteString, Double)]) Source #
Returns the union of multiple sorted sets with scores (https://redis.io/commands/zunion).
O(N) + O(Mlog(M)) with N being the sum of the sizes of the input sorted sets, and M being the number of elements in the resulting sorted set.
Since Redis 6.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | destination |
| -> [ByteString] | keys |
| -> Aggregate | |
| -> m (f Integer) |
Arguments
| :: RedisCtx m f | |
| => ByteString | destination |
| -> [(ByteString, Double)] | weighted keys |
| -> Aggregate | |
| -> m (f Integer) |
data VAddQuantization Source #
Constructors
| VAddNoQuant | |
| VAddQ8 | |
| VAddBin |
Instances
| Show VAddQuantization Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> VAddQuantization -> ShowS # show :: VAddQuantization -> String # showList :: [VAddQuantization] -> ShowS # | |
| Eq VAddQuantization Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: VAddQuantization -> VAddQuantization -> Bool # (/=) :: VAddQuantization -> VAddQuantization -> Bool # | |
| RedisArg VAddQuantization Source # | |
Defined in Database.Redis.ManualCommands Methods encode :: VAddQuantization -> ByteString Source # | |
defaultVAddOpts :: VAddOpts Source #
Redis default VAddOpts. Equivalent to omitting all optional parameters.
data VQuantization Source #
Constructors
| VQuantizationFP32 | |
| VQuantizationBin | |
| VQuantizationQ8 |
Instances
| Show VQuantization Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> VQuantization -> ShowS # show :: VQuantization -> String # showList :: [VQuantization] -> ShowS # | |
| Eq VQuantization Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: VQuantization -> VQuantization -> Bool # (/=) :: VQuantization -> VQuantization -> Bool # | |
| RedisArg VQuantization Source # | |
Defined in Database.Redis.ManualCommands Methods encode :: VQuantization -> ByteString Source # | |
| RedisResult VQuantization Source # | |
Defined in Database.Redis.ManualCommands | |
data VEmbRawResponse Source #
Constructors
| VEmbRawResponse | |
Fields | |
Instances
| Show VEmbRawResponse Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> VEmbRawResponse -> ShowS # show :: VEmbRawResponse -> String # showList :: [VEmbRawResponse] -> ShowS # | |
| Eq VEmbRawResponse Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: VEmbRawResponse -> VEmbRawResponse -> Bool # (/=) :: VEmbRawResponse -> VEmbRawResponse -> Bool # | |
| RedisResult VEmbRawResponse Source # | |
Defined in Database.Redis.ManualCommands | |
data VInfoResponse Source #
Constructors
| VInfoResponse | |
Fields | |
Instances
| Show VInfoResponse Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> VInfoResponse -> ShowS # show :: VInfoResponse -> String # showList :: [VInfoResponse] -> ShowS # | |
| Eq VInfoResponse Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: VInfoResponse -> VInfoResponse -> Bool # (/=) :: VInfoResponse -> VInfoResponse -> Bool # | |
| RedisResult VInfoResponse Source # | |
Defined in Database.Redis.ManualCommands | |
newtype VLinksResponse Source #
Constructors
| VLinksResponse | |
Fields
| |
Instances
| Show VLinksResponse Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> VLinksResponse -> ShowS # show :: VLinksResponse -> String # showList :: [VLinksResponse] -> ShowS # | |
| Eq VLinksResponse Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: VLinksResponse -> VLinksResponse -> Bool # (/=) :: VLinksResponse -> VLinksResponse -> Bool # | |
| RedisResult VLinksResponse Source # | |
Defined in Database.Redis.ManualCommands | |
newtype VLinksWithScoresResponse Source #
Constructors
| VLinksWithScoresResponse | |
Fields
| |
Instances
| Show VLinksWithScoresResponse Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> VLinksWithScoresResponse -> ShowS # show :: VLinksWithScoresResponse -> String # showList :: [VLinksWithScoresResponse] -> ShowS # | |
| Eq VLinksWithScoresResponse Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: VLinksWithScoresResponse -> VLinksWithScoresResponse -> Bool # (/=) :: VLinksWithScoresResponse -> VLinksWithScoresResponse -> Bool # | |
| RedisResult VLinksWithScoresResponse Source # | |
Defined in Database.Redis.ManualCommands | |
Constructors
| VSimByElement ByteString | |
| VSimByFp32 ByteString | |
| VSimByValues (NonEmpty Double) |
Constructors
| VSimOpts | |
Fields
| |
data VSimWithAttribsResult Source #
Constructors
| VSimWithAttribsResult | |
Fields | |
Instances
| Show VSimWithAttribsResult Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> VSimWithAttribsResult -> ShowS # show :: VSimWithAttribsResult -> String # showList :: [VSimWithAttribsResult] -> ShowS # | |
| Eq VSimWithAttribsResult Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: VSimWithAttribsResult -> VSimWithAttribsResult -> Bool # (/=) :: VSimWithAttribsResult -> VSimWithAttribsResult -> Bool # | |
| RedisResult VSimWithAttribsResult Source # | |
Defined in Database.Redis.ManualCommands | |
newtype VSimWithAttribsResponse Source #
Constructors
| VSimWithAttribsResponse | |
Fields | |
Instances
| Show VSimWithAttribsResponse Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> VSimWithAttribsResponse -> ShowS # show :: VSimWithAttribsResponse -> String # showList :: [VSimWithAttribsResponse] -> ShowS # | |
| Eq VSimWithAttribsResponse Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: VSimWithAttribsResponse -> VSimWithAttribsResponse -> Bool # (/=) :: VSimWithAttribsResponse -> VSimWithAttribsResponse -> Bool # | |
| RedisResult VSimWithAttribsResponse Source # | |
Defined in Database.Redis.ManualCommands | |
Arguments
| :: RedisCtx m f | |
| => ByteString | The name of the key that will hold the vector set data. |
| -> NonEmpty Double | The vector values as floating point numbers. This uses the |
| -> ByteString | The name of the element that is being added to the vector set. |
| -> m (f Bool) |
Adds a new element to a vector set, or updates its vector if it already exists (https://redis.io/commands/vadd).
O(log(N)) for each element added, where N is the number of elements in the vector set.
Since Redis 8.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | The name of the key that will hold the vector set data. |
| -> NonEmpty Double | The vector values as floating point numbers. |
| -> ByteString | The name of the element that is being added to the vector set. |
| -> VAddOpts | Additional parameters. `REDUCE dim` reduces the dimensionality of the vector using random projection.
|
| -> m (f Bool) |
Adds a new element to a vector set, or updates its vector if it already exists (https://redis.io/commands/vadd).
O(log(N)) for each element added, where N is the number of elements in the vector set.
Since Redis 8.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | The name of the key that holds the vector set. |
| -> m (f Integer) |
Return the number of elements in the specified vector set (https://redis.io/commands/vcard).
O(1)
Since Redis 8.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | The name of the key that holds the vector set. |
| -> m (f Integer) |
Return the number of dimensions of the vectors in the specified vector set (https://redis.io/commands/vdim).
O(1)
Since Redis 8.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | The name of the key that holds the vector set. |
| -> ByteString | The name of the element whose vector you want to retrieve. |
| -> m (f [Double]) |
Return the approximate vector associated with a given element in the vector set (https://redis.io/commands/vemb).
O(1)
Since Redis 8.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | The name of the key that holds the vector set. |
| -> ByteString | The name of the element whose vector you want to retrieve. |
| -> m (f (Maybe VEmbRawResponse)) |
Return the raw internal representation of the vector associated with a given element in the vector set (https://redis.io/commands/vemb).
O(1)
Since Redis 8.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | The name of the key that holds the vector set. |
| -> ByteString | The name of the element whose attributes you want to retrieve. |
| -> m (f (Maybe ByteString)) |
Retrieve the JSON attributes of an element in a vector set (https://redis.io/commands/vgetattr).
O(1)
Since Redis 8.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | The name of the key that holds the vector set. |
| -> m (f (Maybe VInfoResponse)) |
Return metadata and internal details about a vector set (https://redis.io/commands/vinfo).
O(1)
Since Redis 8.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | The name of the key that holds the vector set. |
| -> ByteString | The name of the element to check. |
| -> m (f Bool) |
Check if an element exists in a vector set (https://redis.io/commands/vismember).
O(1)
Since Redis 8.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | The name of the key that holds the vector set. |
| -> ByteString | The name of the element whose HNSW neighbors you want to inspect. |
| -> m (f (Maybe VLinksResponse)) |
Return the neighbors of a specified element in a vector set (https://redis.io/commands/vlinks).
O(1)
Since Redis 8.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | The name of the key that holds the vector set. |
| -> ByteString | The name of the element whose HNSW neighbors you want to inspect. |
| -> m (f (Maybe VLinksWithScoresResponse)) |
Return the neighbors of a specified element in a vector set together with their similarity scores (https://redis.io/commands/vlinks).
O(1)
Since Redis 8.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | The name of the key that holds the vector set. |
| -> m (f (Maybe ByteString)) |
Return one random element from a vector set (https://redis.io/commands/vrandmember).
O(N) where N is the absolute value of the count argument.
Since Redis 8.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | The name of the key that holds the vector set. |
| -> Integer | The number of elements to return. Positive values return distinct elements; negative values allow duplicates. |
| -> m (f [ByteString]) |
Return one or multiple random elements from a vector set (https://redis.io/commands/vrandmember).
O(N) where N is the absolute value of the count argument.
Since Redis 8.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | The name of the vector set key from which to retrieve elements. |
| -> ByteString | The starting point of the lexicographical range. Use a value prefixed with `[` for an inclusive bound, a value prefixed with `(` for an exclusive bound, or |
| -> ByteString | The ending point of the lexicographical range. Use a value prefixed with `[` for an inclusive bound, a value prefixed with `(` for an exclusive bound, or |
| -> m (f [ByteString]) |
Returns elements in a lexicographical range (https://redis.io/commands/vrange).
O(log(K)+M) where K is the number of elements in the start prefix, and M is the number of elements returned. In practical terms, the command is just O(M).
Since Redis 8.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | The name of the vector set key from which to retrieve elements. |
| -> ByteString | The starting point of the lexicographical range. |
| -> ByteString | The ending point of the lexicographical range. |
| -> Integer | The maximum number of elements to return. If |
| -> m (f [ByteString]) |
Returns elements in a lexicographical range (https://redis.io/commands/vrange).
O(log(K)+M) where K is the number of elements in the start prefix, and M is the number of elements returned. In practical terms, the command is just O(M).
Since Redis 8.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | The name of the key that holds the vector set. |
| -> ByteString | The name of the element to remove from the vector set. |
| -> m (f Bool) |
Remove an element from a vector set (https://redis.io/commands/vrem).
O(log(N)) for each element removed, where N is the number of elements in the vector set.
Since Redis 8.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | The name of the key that holds the vector set. |
| -> ByteString | The name of the element in the vector set. |
| -> ByteString | The attributes as a JSON object string. Use the empty string to remove existing attributes. |
| -> m (f Bool) |
Associate or remove the JSON attributes of an element in a vector set (https://redis.io/commands/vsetattr).
O(1)
Since Redis 8.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | The name of the key that holds the vector set data. |
| -> VSimQuery | Query vector source. Use |
| -> m (f [ByteString]) |
Return elements similar to a given vector or element (https://redis.io/commands/vsim).
O(log(N)) where N is the number of elements in the vector set.
Since Redis 8.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | The name of the key that holds the vector set data. |
| -> VSimQuery | Query vector source. |
| -> VSimOpts | Additional search options.
|
| -> m (f [ByteString]) |
Return elements similar to a given vector or element (https://redis.io/commands/vsim).
O(log(N)) where N is the number of elements in the vector set.
Since Redis 8.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | The name of the key that holds the vector set data. |
| -> VSimQuery | Query vector source. |
| -> m (f [(ByteString, Double)]) |
Return elements similar to a given vector or element together with their similarity scores (https://redis.io/commands/vsim).
O(log(N)) where N is the number of elements in the vector set.
Since Redis 8.0.0
vsimWithScoresOpts :: RedisCtx m f => ByteString -> VSimQuery -> VSimOpts -> m (f [(ByteString, Double)]) Source #
Return elements similar to a given vector or element together with their similarity scores (https://redis.io/commands/vsim).
O(log(N)) where N is the number of elements in the vector set.
Since Redis 8.0.0
vsimWithScoresWithAttribs Source #
Arguments
| :: RedisCtx m f | |
| => ByteString | The name of the key that holds the vector set data. |
| -> VSimQuery | Query vector source. |
| -> m (f VSimWithAttribsResponse) |
Return elements similar to a given vector or element together with their similarity scores and JSON attributes (https://redis.io/commands/vsim).
O(log(N)) where N is the number of elements in the vector set.
Since Redis 8.2.0
vsimWithScoresWithAttribsOpts :: RedisCtx m f => ByteString -> VSimQuery -> VSimOpts -> m (f VSimWithAttribsResponse) Source #
Return elements similar to a given vector or element together with their similarity scores and JSON attributes (https://redis.io/commands/vsim).
O(log(N)) where N is the number of elements in the vector set.
Since Redis 8.2.0
data ARGrepPredicate Source #
Constructors
| ARGrepExact ByteString | |
| ARGrepMatch ByteString | |
| ARGrepGlob ByteString | |
| ARGrepRegex ByteString |
Instances
| Show ARGrepPredicate Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> ARGrepPredicate -> ShowS # show :: ARGrepPredicate -> String # showList :: [ARGrepPredicate] -> ShowS # | |
| Eq ARGrepPredicate Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: ARGrepPredicate -> ARGrepPredicate -> Bool # (/=) :: ARGrepPredicate -> ARGrepPredicate -> Bool # | |
data ARGrepCombine Source #
Instances
| Show ARGrepCombine Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> ARGrepCombine -> ShowS # show :: ARGrepCombine -> String # showList :: [ARGrepCombine] -> ShowS # | |
| Eq ARGrepCombine Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: ARGrepCombine -> ARGrepCombine -> Bool # (/=) :: ARGrepCombine -> ARGrepCombine -> Bool # | |
data ARGrepOpts Source #
Constructors
| ARGrepOpts | |
Fields | |
Instances
| Show ARGrepOpts Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> ARGrepOpts -> ShowS # show :: ARGrepOpts -> String # showList :: [ARGrepOpts] -> ShowS # | |
| Eq ARGrepOpts Source # | |
Defined in Database.Redis.ManualCommands | |
defaultARGrepOpts :: ARGrepOpts Source #
Redis default ARGrepOpts. Equivalent to omitting all optional parameters.
data ARLastItemsOpts Source #
Constructors
| ARLastItemsOpts | |
Fields | |
Instances
| Show ARLastItemsOpts Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> ARLastItemsOpts -> ShowS # show :: ARLastItemsOpts -> String # showList :: [ARLastItemsOpts] -> ShowS # | |
| Eq ARLastItemsOpts Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: ARLastItemsOpts -> ARLastItemsOpts -> Bool # (/=) :: ARLastItemsOpts -> ARLastItemsOpts -> Bool # | |
defaultARLastItemsOpts :: ARLastItemsOpts Source #
Redis default ARLastItemsOpts. Equivalent to omitting all optional parameters.
data ARScanOpts Source #
Constructors
| ARScanOpts | |
Fields | |
Instances
| Show ARScanOpts Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> ARScanOpts -> ShowS # show :: ARScanOpts -> String # showList :: [ARScanOpts] -> ShowS # | |
| Eq ARScanOpts Source # | |
Defined in Database.Redis.ManualCommands | |
defaultARScanOpts :: ARScanOpts Source #
Redis default ARScanOpts. Equivalent to omitting all optional parameters.
newtype ARIndexValuePairsResponse Source #
Constructors
| ARIndexValuePairsResponse | |
Fields
| |
Instances
| Show ARIndexValuePairsResponse Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> ARIndexValuePairsResponse -> ShowS # show :: ARIndexValuePairsResponse -> String # showList :: [ARIndexValuePairsResponse] -> ShowS # | |
| Eq ARIndexValuePairsResponse Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: ARIndexValuePairsResponse -> ARIndexValuePairsResponse -> Bool # (/=) :: ARIndexValuePairsResponse -> ARIndexValuePairsResponse -> Bool # | |
| RedisResult ARIndexValuePairsResponse Source # | |
Defined in Database.Redis.ManualCommands | |
data ARInfoResponse Source #
Constructors
| ARInfoResponse | |
Fields
| |
Instances
| Show ARInfoResponse Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> ARInfoResponse -> ShowS # show :: ARInfoResponse -> String # showList :: [ARInfoResponse] -> ShowS # | |
| Eq ARInfoResponse Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: ARInfoResponse -> ARInfoResponse -> Bool # (/=) :: ARInfoResponse -> ARInfoResponse -> Bool # | |
| RedisResult ARInfoResponse Source # | |
Defined in Database.Redis.ManualCommands | |
Arguments
| :: RedisCtx m f | |
| => ByteString | Array key. |
| -> m (f Integer) |
Returns the number of non-empty elements in an array (https://redis.io/commands/arcount).
O(1)
Since Redis 8.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Array key. |
| -> NonEmpty Integer | One or more zero-based indices to delete. |
| -> m (f Integer) |
Deletes elements at the specified indices in an array (https://redis.io/commands/ardel).
O(N) where N is the number of indices to delete.
Since Redis 8.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Array key. |
| -> Integer | Start index. |
| -> Integer | End index, inclusive. |
| -> m (f [Maybe ByteString]) |
Gets values in a range of indices (https://redis.io/commands/argetrange).
O(N) where N is the range length.
Since Redis 8.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Array key. |
| -> ByteString | Start index or |
| -> ByteString | End index or |
| -> NonEmpty ARGrepPredicate | One or more predicates to apply. |
| -> m (f [Integer]) |
Searches array elements in a range using textual predicates (https://redis.io/commands/argrep).
O(P * C) where P is the number of visited positions and C is the cost of evaluating predicates.
Since Redis 8.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Array key. |
| -> ByteString | Start index or |
| -> ByteString | End index or |
| -> NonEmpty ARGrepPredicate | One or more predicates to apply. |
| -> ARGrepOpts | Additional predicate options. |
| -> m (f [Integer]) |
Searches array elements in a range using textual predicates (https://redis.io/commands/argrep).
O(P * C) where P is the number of visited positions and C is the cost of evaluating predicates.
Since Redis 8.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Array key. |
| -> ByteString | Start index or |
| -> ByteString | End index or |
| -> NonEmpty ARGrepPredicate | One or more predicates to apply. |
| -> m (f ARIndexValuePairsResponse) |
Searches array elements in a range and returns matching index-value pairs (https://redis.io/commands/argrep).
O(P * C) where P is the number of visited positions and C is the cost of evaluating predicates.
Since Redis 8.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Array key. |
| -> ByteString | Start index or |
| -> ByteString | End index or |
| -> NonEmpty ARGrepPredicate | One or more predicates to apply. |
| -> ARGrepOpts | Additional predicate options. |
| -> m (f ARIndexValuePairsResponse) |
Searches array elements in a range and returns matching index-value pairs (https://redis.io/commands/argrep).
O(P * C) where P is the number of visited positions and C is the cost of evaluating predicates.
Since Redis 8.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Array key. |
| -> m (f ARInfoResponse) |
Returns metadata about an array (https://redis.io/commands/arinfo).
O(1), or O(N) with FULL where N is the number of slices.
Since Redis 8.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Array key. |
| -> m (f ARInfoResponse) |
Returns extended metadata about an array (https://redis.io/commands/arinfo).
O(N) where N is the number of slices.
Since Redis 8.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Array key. |
| -> NonEmpty ByteString | Values to insert at the current insert cursor. |
| -> m (f Integer) |
Inserts one or more values at consecutive indices (https://redis.io/commands/arinsert).
O(N) where N is the number of values.
Since Redis 8.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Array key. |
| -> Integer | Maximum number of most recently inserted elements to return. |
| -> m (f [Maybe ByteString]) |
Returns the most recently inserted elements (https://redis.io/commands/arlastitems).
O(N) where N is the count.
Since Redis 8.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Array key. |
| -> Integer | Maximum number of most recently inserted elements to return. |
| -> ARLastItemsOpts | Additional options. |
| -> m (f [Maybe ByteString]) |
Returns the most recently inserted elements (https://redis.io/commands/arlastitems).
O(N) where N is the count.
Since Redis 8.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Array key. |
| -> m (f Integer) |
Returns the length of an array (max index + 1) (https://redis.io/commands/arlen).
O(1)
Since Redis 8.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Array key. |
| -> NonEmpty Integer | One or more zero-based indices. |
| -> m (f [Maybe ByteString]) |
Gets values at multiple indices in an array (https://redis.io/commands/armget).
O(N) where N is the number of indices.
Since Redis 8.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Array key. |
| -> m (f (Maybe Integer)) |
Returns the next index that ARINSERT would use (https://redis.io/commands/arnext).
O(1)
Since Redis 8.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Array key. |
| -> Integer | Start index. |
| -> Integer | End index. |
| -> AROpValue | Aggregate operation. |
| -> m (f (Maybe ByteString)) |
Performs aggregate operations on array elements in a range and returns a string result (https://redis.io/commands/arop).
O(P) where P is the number of visited positions in touched slices.
Since Redis 8.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Array key. |
| -> Integer | Start index. |
| -> Integer | End index. |
| -> AROpCount | Aggregate operation. |
| -> m (f (Maybe Integer)) |
Performs aggregate operations on array elements in a range and returns an integer result (https://redis.io/commands/arop).
O(P) where P is the number of visited positions in touched slices.
Since Redis 8.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Array key. |
| -> Integer | Ring buffer size. |
| -> NonEmpty ByteString | Values to insert. |
| -> m (f Integer) |
Inserts values into a ring buffer of specified size, wrapping and truncating as needed (https://redis.io/commands/arring).
O(M) normally, or O(N+M) on ring resize.
Since Redis 8.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Array key. |
| -> Integer | Start index. |
| -> Integer | End index. |
| -> m (f ARIndexValuePairsResponse) |
Iterates existing elements in a range, returning index-value pairs (https://redis.io/commands/arscan).
O(P) where P is the number of visited positions in touched slices.
Since Redis 8.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Array key. |
| -> Integer | Start index. |
| -> Integer | End index. |
| -> ARScanOpts | Additional options. |
| -> m (f ARIndexValuePairsResponse) |
Iterates existing elements in a range, returning index-value pairs (https://redis.io/commands/arscan).
O(P) where P is the number of visited positions in touched slices.
Since Redis 8.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Array key. |
| -> Integer | The new insert cursor position. |
| -> m (f Bool) |
Sets the ARINSERT ARRING cursor to a specific index (<https:redis.iocommands/arseek>).
O(1)
Since Redis 8.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Array key. |
| -> Integer | Start index. |
| -> NonEmpty ByteString | One or more values to store at consecutive indices. |
| -> m (f Integer) |
Sets one or more contiguous values starting at an index in an array (https://redis.io/commands/arset).
O(N) where N is the number of values.
Since Redis 8.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | start |
| -> Integer | end |
| -> m (f Integer) |
Arguments
| :: RedisCtx m f | |
| => ByteString | destkey |
| -> [ByteString] | srckeys |
| -> m (f Integer) |
Arguments
| :: RedisCtx m f | |
| => ByteString | destkey |
| -> [ByteString] | srckeys |
| -> m (f Integer) |
Arguments
| :: RedisCtx m f | |
| => ByteString | destkey |
| -> [ByteString] | srckeys |
| -> m (f Integer) |
Arguments
| :: RedisCtx m f | |
| => ByteString | destkey |
| -> ByteString | srckey |
| -> m (f Integer) |
Find first bit set or clear in a string (http://redis.io/commands/bitpos). Since Redis 2.8.7
bitposOpts :: RedisCtx m f => ByteString -> Integer -> BitposOpts -> m (f Integer) Source #
data BitposOpts Source #
Constructors
| BitposOptsStart Integer | |
| BitposOptsStartEnd Integer Integer (Maybe BitposType) |
data BitposType Source #
Instances
| RedisArg BitposType Source # | |
Defined in Database.Redis.ManualCommands Methods encode :: BitposType -> ByteString Source # | |
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> m (f Integer) |
Decrement the integer value of a key by one (http://redis.io/commands/decr). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | decrement |
| -> m (f Integer) |
Decrement the integer value of a key by the given number (http://redis.io/commands/decrby). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the string. |
| -> m (f Bool) |
Conditionally removes the specified key based on value or hash digest comparison (https://redis.io/commands/delex).
O(1) for IFEQ and IFNE. O(N) for IFDEQ and IFDNE, where N is the length of the string value.
Since Redis 8.4.0
data DelexCondition Source #
Constructors
| DelexIfEq ByteString | |
| DelexIfNe ByteString | |
| DelexIfDigestEq ByteString | |
| DelexIfDigestNe ByteString |
Instances
| Show DelexCondition Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> DelexCondition -> ShowS # show :: DelexCondition -> String # showList :: [DelexCondition] -> ShowS # | |
| Eq DelexCondition Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: DelexCondition -> DelexCondition -> Bool # (/=) :: DelexCondition -> DelexCondition -> Bool # | |
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the string. |
| -> DelexCondition | Condition to enforce. The |
| -> m (f Bool) |
Conditionally removes the specified key based on value or hash digest comparison (https://redis.io/commands/delex).
O(1) for IFEQ and IFNE. O(N) for IFDEQ and IFDNE, where N is the length of the string value.
Since Redis 8.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the string. |
| -> m (f (Maybe ByteString)) |
Returns the hash digest of a string value (https://redis.io/commands/digest).
O(N) where N is the length of the string value.
Since Redis 8.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key. |
| -> Integer | Offset. |
| -> m (f Integer) |
Returns the bit value at offset in the string value stored at key (http://redis.io/commands/getbit). Since Redis 2.2.0
getdel :: RedisCtx m f => ByteString -> m (f (Maybe ByteString)) Source #
Returns the string value of a key after deleting the key (https://redis.io/commands/getdel).
O(1)
Since Redis 6.2.0
getex :: RedisCtx m f => ByteString -> m (f (Maybe ByteString)) Source #
Returns the string value of a key after setting its expiration time (https://redis.io/commands/getex).
O(1)
Since Redis 6.2.0
data IncrexExpiration Source #
Constructors
| IncrexSeconds Integer | |
| IncrexMilliseconds Integer | |
| IncrexUnixSeconds Integer | |
| IncrexUnixMilliseconds Integer | |
| IncrexPersist |
Instances
| Show IncrexExpiration Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> IncrexExpiration -> ShowS # show :: IncrexExpiration -> String # showList :: [IncrexExpiration] -> ShowS # | |
| Eq IncrexExpiration Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: IncrexExpiration -> IncrexExpiration -> Bool # (/=) :: IncrexExpiration -> IncrexExpiration -> Bool # | |
data IncrexOpts a Source #
Constructors
| IncrexOpts | |
Fields | |
Instances
| Show a => Show (IncrexOpts a) Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> IncrexOpts a -> ShowS # show :: IncrexOpts a -> String # showList :: [IncrexOpts a] -> ShowS # | |
| Eq a => Eq (IncrexOpts a) Source # | |
Defined in Database.Redis.ManualCommands | |
defaultIncrexOpts :: IncrexOpts a Source #
Redis default IncrexOpts. Equivalent to omitting all optional parameters.
Arguments
| :: RedisCtx m f | |
| => ByteString | The name of the key to increment. |
| -> m (f (Integer, Integer)) |
Increments the numeric value of a key by one and optionally updates its expiration (https://redis.io/commands/increx).
O(1)
Since Redis 8.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | The name of the key to increment. |
| -> IncrexOpts Integer | Bound and expiration options.
|
| -> m (f (Integer, Integer)) |
Increments the numeric value of a key by one and optionally updates its expiration (https://redis.io/commands/increx).
O(1)
Since Redis 8.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | The name of the key to increment. |
| -> Integer | The integer increment to apply. |
| -> IncrexOpts Integer | Bound and expiration options. |
| -> m (f (Integer, Integer)) |
Increments the integer value of a key by a specific amount and optionally updates its expiration (https://redis.io/commands/increx).
O(1)
Since Redis 8.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | The name of the key to increment. |
| -> Double | The floating-point increment to apply. |
| -> IncrexOpts Double | Bound and expiration options. |
| -> m (f (Double, Double)) |
Increments the floating-point value of a key by a specific amount and optionally updates its expiration (https://redis.io/commands/increx).
O(1)
Since Redis 8.8.0
getexOpts :: RedisCtx m f => ByteString -> GetExOpts -> m (f (Maybe ByteString)) Source #
Returns the string value of a key after setting its expiration time (https://redis.io/commands/getex).
O(1)
Since Redis 6.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | start |
| -> Integer | end |
| -> m (f ByteString) |
Get a substring of the string stored at a key (http://redis.io/commands/getrange). Since Redis 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> ByteString | value |
| -> m (f (Maybe ByteString)) |
Set the string value of a key and return its old value (http://redis.io/commands/getset). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> m (f Integer) |
Increment the integer value of a key by one (http://redis.io/commands/incr). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | increment |
| -> m (f Integer) |
Increment the integer value of a key by the given amount (http://redis.io/commands/incrby). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key. |
| -> Double | Increment. |
| -> m (f Double) |
Increment the float value of a key by the given amount (http://redis.io/commands/incrbyfloat). Since Redis 2.6.0
Arguments
| :: RedisCtx m f | |
| => NonEmpty ByteString | key |
| -> m (f [Maybe ByteString]) |
Get the values of all the given keys (http://redis.io/commands/mget). Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => NonEmpty (ByteString, ByteString) | keyValue |
| -> m (f Status) |
Set multiple keys to multiple values (http://redis.io/commands/mset). Since Redis 1.0.1
Arguments
| :: RedisCtx m f | |
| => NonEmpty (ByteString, ByteString) | A series of key/value pairs. |
| -> m (f Bool) |
Atomically sets multiple string keys with an optional shared expiration in a single operation (https://redis.io/commands/msetex).
O(N) where N is the number of keys to set.
Since Redis 8.4.0
Arguments
| :: RedisCtx m f | |
| => NonEmpty (ByteString, ByteString) | A series of key/value pairs. |
| -> SetOpts | Shared condition and expiration flags. The |
| -> m (f Bool) |
Atomically sets multiple string keys with an optional shared expiration in a single operation (https://redis.io/commands/msetex).
O(N) where N is the number of keys to set.
Since Redis 8.4.0
Arguments
| :: RedisCtx m f | |
| => NonEmpty (ByteString, ByteString) | keyValue |
| -> m (f Bool) |
Set multiple keys to multiple values, only if none of the keys exist (http://redis.io/commands/msetnx). Since Redis 1.0.1
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | milliseconds |
| -> ByteString | value |
| -> m (f Status) |
Set the value and expiration in milliseconds of a key (http://redis.io/commands/psetex). Condidered deprecated since it can be replaced by SET with the PX argument when migrating or writing new code Since Redis 2.6.0
Constructors
| Nx | Only set the key if it does not already exist. |
| Xx | Only set the key if it already exists. |
Constructors
| SetOpts | |
Fields
| |
defaultSetOpts :: SetOpts Source #
Redis default SetOpts. Equivalent to omitting all optional parameters.
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> ByteString | value |
| -> SetOpts | |
| -> m (f Status) |
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> ByteString | value |
| -> m (f ByteString) |
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> ByteString | value |
| -> SetOpts | |
| -> m (f ByteString) |
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | offset |
| -> ByteString | value |
| -> m (f Integer) |
Sets or clears the bit at offset in the string value stored at key (http://redis.io/commands/setbit). Since Redis 2.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | seconds |
| -> ByteString | value |
| -> m (f Status) |
Set the value and expiration of a key (http://redis.io/commands/setex). Regarded as deprected since 2.6 as it can be replaced by SET with the EX argument when migrating or writing new code. Since Redis 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key to set. |
| -> ByteString | Value to set. |
| -> m (f Bool) |
O(1) Sets the value of a key, only if the key does not exist (http://redis.io/commands/setnx).
Returns a result if a value was set.
Since Redis 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | offset |
| -> ByteString | value |
| -> m (f Integer) |
Overwrite part of a string at key starting at the specified offset (http://redis.io/commands/setrange).
Returns the lenght of the string after it was modified.
Since Redis 2.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> m (f Integer) |
Get the length of the value stored in a key (http://redis.io/commands/strlen). Since Redis 2.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | key |
| -> Integer | start |
| -> Integer | end |
| -> m (f ByteString) |
Get a substring of the string stored at a key (http://redis.io/commands/substr).
Deprecated in Redis. Use getrange instead.
Since Redis 1.0.0
defaultXreadOpts :: XReadOpts Source #
Redis default XReadOpts. Equivalent to omitting all optional parameters.
XReadOpts
{ block = Nothing -- Don't block waiting for more records
, recordCount = Nothing -- no record count
}
data StreamsRecord Source #
Constructors
| StreamsRecord | |
Fields
| |
Instances
| Show StreamsRecord Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> StreamsRecord -> ShowS # show :: StreamsRecord -> String # showList :: [StreamsRecord] -> ShowS # | |
| Eq StreamsRecord Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: StreamsRecord -> StreamsRecord -> Bool # (/=) :: StreamsRecord -> StreamsRecord -> Bool # | |
| RedisResult StreamsRecord Source # | |
Defined in Database.Redis.ManualCommands | |
Arguments
| :: RedisCtx m f | |
| => ByteString | Stream name |
| -> ByteString | Message id |
| -> [(ByteString, ByteString)] | Message data (field, value) |
| -> m (f ByteString) |
O(1) Adds a value to a stream (https://redis.io/commands/xadd). Since Redis 5.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Stream name. |
| -> ByteString | Message ID |
| -> [(ByteString, ByteString)] | Message data (field, value) |
| -> XAddOpts | Additional parameteers |
| -> m (f ByteString) | ID of the added entry. |
Add a value to a stream (https://redis.io/commands/xadd). The Redis command XADD is split up into xadd, xaddOpts. Since Redis 5.0.0
Constructors
| XAddOpts | |
Fields
| |
data TrimStrategy Source #
Trimming strategy.
Since: 0.16.0
Constructors
| TrimMaxlen Integer | Evicts entries as long as the stream's length exceeds the specified threshold, where threshold is a positive integer. |
| TrimMinId ByteString | Evicts entries with IDs lower than threshold, where threshold is a stream ID. Since Redis 6.2: will fail if used on ealier versions. |
Type of the trimming.
Since: 0.16.0
Constructors
| TrimExact | Exact trimming |
| TrimApprox (Maybe Integer) | Approximate trimming. Is faster, but may leave slightly more elements in the stream if they can't be immediately deleted. Additional parameter Specifies the maximal count of entries that will be evicted. When LIMIT and count aren't specified, the default value of 100 * the number of entries in a macro node will be implicitly used as the count, |
Arguments
| :: RedisCtx m f | |
| => [(ByteString, ByteString)] | (stream, id) pairs |
| -> m (f (Maybe [XReadResponse])) |
Read values from a stream (https://redis.io/commands/xread).
The Redis command XREAD is split up into xread, xreadOpts.
Since Redis 5.0.0
Arguments
| :: RedisCtx m f | |
| => [(ByteString, ByteString)] | (stream, id) pairs |
| -> XReadOpts | Options |
| -> m (f (Maybe [XReadResponse])) |
Read values from a stream (https://redis.io/commands/xread). The Redis command XREAD is split up into xread, xreadOpts. Since Redis 5.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | group name |
| -> ByteString | consumer name |
| -> [(ByteString, ByteString)] | (stream, id) pairs |
| -> m (f (Maybe [XReadResponse])) |
data XReadGroupOpts Source #
Constructors
| XReadGroupOpts | |
Fields | |
Instances
| Show XReadGroupOpts Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> XReadGroupOpts -> ShowS # show :: XReadGroupOpts -> String # showList :: [XReadGroupOpts] -> ShowS # | |
| Eq XReadGroupOpts Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: XReadGroupOpts -> XReadGroupOpts -> Bool # (/=) :: XReadGroupOpts -> XReadGroupOpts -> Bool # | |
Arguments
| :: RedisCtx m f | |
| => ByteString | group name |
| -> ByteString | consumer name |
| -> [(ByteString, ByteString)] | (stream, id) pairs |
| -> XReadGroupOpts | Options |
| -> m (f (Maybe [XReadResponse])) |
Arguments
| :: RedisCtx m f | |
| => ByteString | stream |
| -> ByteString | group name |
| -> [ByteString] | message IDs |
| -> m (f Integer) |
Arguments
| :: RedisCtx m f | |
| => ByteString | Stream name. |
| -> ByteString | Consumer group name. |
| -> NonEmpty ByteString | Entry IDs. |
| -> m (f [XEntryDeletionResult]) |
Acknowledges and conditionally deletes entries for a consumer group (https://redis.io/commands/xackdel).
O(1) for each entry ID processed.
Since Redis 8.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Stream name. |
| -> ByteString | Consumer group name. |
| -> NonEmpty ByteString | Entry IDs. |
| -> XEntryDeletionOpts | Additional options. |
| -> m (f [XEntryDeletionResult]) |
Acknowledges and conditionally deletes entries for a consumer group (https://redis.io/commands/xackdel).
O(1) for each entry ID processed.
Since Redis 8.2.0
data XRefPolicy Source #
Constructors
| XRefPolicyKeepRef | Deletes the specified entries from the stream, but preserves existing references to these entries in all consumer groups |
| XRefPolicyDelRef | Deletes the specified entries from the stream and also removes all references to these entries from all consumer groups' pending entry lists, effectively cleaning up all traces of the messages. If an entry ID is not in the stream, but there are dangling references, XDELEX with DELREF would still remove all those references. |
| XRefPolicyAcked | Deletes the specified entries from the stream only if they have been acknowledged by all consumer groups. |
Instances
| Show XRefPolicy Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> XRefPolicy -> ShowS # show :: XRefPolicy -> String # showList :: [XRefPolicy] -> ShowS # | |
| Eq XRefPolicy Source # | |
Defined in Database.Redis.ManualCommands | |
| RedisArg XRefPolicy Source # | |
Defined in Database.Redis.ManualCommands Methods encode :: XRefPolicy -> ByteString Source # | |
data XEntryDeletionOpts Source #
Constructors
| XEntryDeletionOpts | |
Fields | |
Instances
| Show XEntryDeletionOpts Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> XEntryDeletionOpts -> ShowS # show :: XEntryDeletionOpts -> String # showList :: [XEntryDeletionOpts] -> ShowS # | |
| Eq XEntryDeletionOpts Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: XEntryDeletionOpts -> XEntryDeletionOpts -> Bool # (/=) :: XEntryDeletionOpts -> XEntryDeletionOpts -> Bool # | |
data XEntryDeletionResult Source #
Instances
| Show XEntryDeletionResult Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> XEntryDeletionResult -> ShowS # show :: XEntryDeletionResult -> String # showList :: [XEntryDeletionResult] -> ShowS # | |
| Eq XEntryDeletionResult Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: XEntryDeletionResult -> XEntryDeletionResult -> Bool # (/=) :: XEntryDeletionResult -> XEntryDeletionResult -> Bool # | |
| RedisResult XEntryDeletionResult Source # | |
Defined in Database.Redis.ManualCommands | |
data XCfgSetOpts Source #
Constructors
| XCfgSetOpts | |
Fields
| |
Instances
| Show XCfgSetOpts Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> XCfgSetOpts -> ShowS # show :: XCfgSetOpts -> String # showList :: [XCfgSetOpts] -> ShowS # | |
| Eq XCfgSetOpts Source # | |
Defined in Database.Redis.ManualCommands | |
defaultXCfgSetOpts :: XCfgSetOpts Source #
Redis default XCfgSetOpts. Equivalent to omitting all optional parameters.
At least one field must be set before calling xcfgset.
Arguments
| :: RedisCtx m f | |
| => ByteString | The name of the stream key. The stream must already exist. |
| -> XCfgSetOpts | Configuration parameters. At least one of |
| -> m (f Status) |
Sets the IDMP configuration parameters for a stream (https://redis.io/commands/xcfgset).
O(1)
Since Redis 8.6.0
Constructors
| XNackSilent | |
| XNackFail | |
| XNackFatal |
defaultXNackOpts :: XNackOpts Source #
Redis default XNackOpts. Equivalent to omitting all optional parameters.
Arguments
| :: RedisCtx m f | |
| => ByteString | Stream key. |
| -> ByteString | Producer ID. |
| -> ByteString | Idempotency ID. |
| -> ByteString | Existing stream entry ID. |
| -> m (f Status) |
Sets IDMP metadata on an existing stream message (https://redis.io/commands/xidmprecord).
This is an internal command used during AOF loading.
O(1)
Since Redis 8.6.2
Arguments
| :: RedisCtx m f | |
| => ByteString | Stream key. |
| -> ByteString | Consumer group name. |
| -> XNackMode | Release strategy. |
| -> NonEmpty ByteString | Stream entry IDs. |
| -> m (f Integer) |
Releases claimed messages back to the group's PEL without acknowledging them (https://redis.io/commands/xnack).
O(1) for each message ID processed.
Since Redis 8.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Stream key. |
| -> ByteString | Consumer group name. |
| -> XNackMode | Release strategy. |
| -> NonEmpty ByteString | Stream entry IDs. |
| -> XNackOpts | Additional options. |
| -> m (f Integer) |
Releases claimed messages back to the group's PEL without acknowledging them (https://redis.io/commands/xnack).
O(1) for each message ID processed.
Since Redis 8.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Stream name. |
| -> ByteString | Consumer group name. |
| -> ByteString | ID of the message to start reading with. |
| -> m (f Status) |
O(1) Creates consumer group.
Fails if called on with the stream name that does not exist, use xgroupCreateOpts
to override this behavior.
Arguments
| :: RedisCtx m f | |
| => ByteString | Stream name. |
| -> ByteString | Consumer group name. |
| -> ByteString | ID of the message to start reading with. |
| -> XGroupCreateOpts | Additional parameters. |
| -> m (f Status) |
O(1) Creates consumer group, accepts additional parameters.
data XGroupCreateOpts Source #
Additional parameters of the XGroupCreate
Constructors
| XGroupCreateOpts | |
Fields
| |
Instances
| Show XGroupCreateOpts Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> XGroupCreateOpts -> ShowS # show :: XGroupCreateOpts -> String # showList :: [XGroupCreateOpts] -> ShowS # | |
| Eq XGroupCreateOpts Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: XGroupCreateOpts -> XGroupCreateOpts -> Bool # (/=) :: XGroupCreateOpts -> XGroupCreateOpts -> Bool # | |
defaultXGroupCreateOpts :: XGroupCreateOpts Source #
Specifies default group opts.
Prefer using this method over use of constructor to preserve backwards compatibility.
Arguments
| :: RedisCtx m f | |
| => ByteString | Stream name. |
| -> ByteString | Consumer group name. |
| -> ByteString | Consumer name. |
| -> m (f Bool) | Returns if the consumer was created or not. |
O(1) Creates new consumer in the consumers group.
Since redis 6.2.0: fails on the ealier versions.
Arguments
| :: RedisCtx m f | |
| => ByteString | Stream name. |
| -> ByteString | Consumr group name. |
| -> ByteString | Message ID or |
| -> m (f Status) |
O(1) Sets last delivered id for a consumer group.
Arguments
| :: RedisCtx m f | |
| => ByteString | Stream name. |
| -> ByteString | Consumer group name. |
| -> ByteString | Message id or @$S |
| -> XGroupSetIdOpts | Additional parameters. |
| -> m (f Status) |
O(1) a variant of the xgroupSetId that allowes to pass additional parameters.
newtype XGroupSetIdOpts Source #
Additional parameters for the xgroupSetId method
Constructors
| XGroupSetIdOpts | |
Fields
| |
defaultXGroupSetIdOpts :: XGroupSetIdOpts Source #
Default value for the XGroupSetIdOpts.
Prefer use this method over the raw constructor in order to preserve backwards compatibility.
Arguments
| :: RedisCtx m f | |
| => ByteString | Stream name. |
| -> ByteString | Consumer group name. |
| -> m (f Bool) | Tells if the group was destroyed or not. |
O(1) destroys a group.
Arguments
| :: RedisCtx m f | |
| => ByteString | Stream name. |
| -> ByteString | Consumer group name. |
| -> ByteString | Consumer name. |
| -> m (f Integer) | The number of pending messages owned by the consumer. |
O(1) Delete consumer.
Arguments
| :: RedisCtx m f | |
| => ByteString | stream |
| -> ByteString | start |
| -> ByteString | end |
| -> Maybe Integer | COUNT |
| -> m (f [StreamsRecord]) |
Arguments
| :: RedisCtx m f | |
| => ByteString | stream |
| -> ByteString | end |
| -> ByteString | start |
| -> Maybe Integer | COUNT |
| -> m (f [StreamsRecord]) |
Arguments
| :: RedisCtx m f | |
| => ByteString | Stream name. |
| -> ByteString | Stream consumer group. |
| -> m (f XPendingSummaryResponse) |
O(N) N - number of message beign returned.
Get information about pending messages (https:/redis.iocommands/xpending).
Since Redis 5.0.
data XPendingSummaryResponse Source #
Constructors
| XPendingSummaryResponse | |
Instances
| Show XPendingSummaryResponse Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> XPendingSummaryResponse -> ShowS # show :: XPendingSummaryResponse -> String # showList :: [XPendingSummaryResponse] -> ShowS # | |
| Eq XPendingSummaryResponse Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: XPendingSummaryResponse -> XPendingSummaryResponse -> Bool # (/=) :: XPendingSummaryResponse -> XPendingSummaryResponse -> Bool # | |
| RedisResult XPendingSummaryResponse Source # | |
Defined in Database.Redis.ManualCommands | |
data XPendingDetailOpts Source #
Additional parameters of the xpending call family
Constructors
| XPendingDetailOpts | |
Fields
| |
defaultXPendingDetailOpts :: XPendingDetailOpts Source #
Default XPendingOpts values.
Prefer this method over use of the constructor in order to preserve backwards compatibility.
data XPendingDetailRecord Source #
Details about message returned by the xpendingDetails
Constructors
| XPendingDetailRecord | |
Fields | |
Instances
| Show XPendingDetailRecord Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> XPendingDetailRecord -> ShowS # show :: XPendingDetailRecord -> String # showList :: [XPendingDetailRecord] -> ShowS # | |
| Eq XPendingDetailRecord Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: XPendingDetailRecord -> XPendingDetailRecord -> Bool # (/=) :: XPendingDetailRecord -> XPendingDetailRecord -> Bool # | |
| RedisResult XPendingDetailRecord Source # | |
Defined in Database.Redis.ManualCommands | |
Arguments
| :: RedisCtx m f | |
| => ByteString | Stream name. |
| -> ByteString | Consumer group name. |
| -> ByteString | ID of the first interesting message. |
| -> ByteString | ID of the last intersting message. |
| -> Integer | Limits the numbere of messages returned from the call. |
| -> XPendingDetailOpts | |
| -> m (f [XPendingDetailRecord]) |
O(N) N - number of messages returned.
Get detailed information about pending messages (https:/redis.iocommands/xpending).
data XClaimOpts Source #
Constructors
| XClaimOpts | |
Fields
| |
Instances
| Show XClaimOpts Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> XClaimOpts -> ShowS # show :: XClaimOpts -> String # showList :: [XClaimOpts] -> ShowS # | |
| Eq XClaimOpts Source # | |
Defined in Database.Redis.ManualCommands | |
Arguments
| :: RedisCtx m f | |
| => ByteString | stream |
| -> ByteString | group |
| -> ByteString | consumer |
| -> Integer | min idle time |
| -> XClaimOpts | optional arguments |
| -> [ByteString] | message IDs |
| -> m (f [StreamsRecord]) |
Arguments
| :: RedisCtx m f | |
| => ByteString | stream |
| -> ByteString | group |
| -> ByteString | consumer |
| -> Integer | min idle time |
| -> XClaimOpts | optional arguments |
| -> [ByteString] | message IDs |
| -> m (f [ByteString]) |
Arguments
| :: RedisCtx m f | |
| => ByteString | Stream name. |
| -> ByteString | Consumer group name. |
| -> ByteString | Consumer name. |
| -> Integer | Min idle time (ms). |
| -> ByteString | ID of the message to start. |
| -> m (f XAutoclaimStreamsResult) |
O(1) Transfers ownership of pending stream entries that match the specified criteria. The message should be pending for more than <min-idle-time> milliseconds and ID should be greater than <start>.
XAUTOCLAIM <stream name> <consumer group name> <min idle time> <start>
This version of function claims no more than 100 mesages, use xautoclaimOpt to
override this behavior.
Since Redis 7.0: fails on ealier versions.
Arguments
| :: RedisCtx m f | |
| => ByteString | Stream name. |
| -> ByteString | Consumer group name. |
| -> ByteString | Consumer name. |
| -> Integer | min idle time (ms). |
| -> ByteString | start ID. |
| -> XAutoclaimOpts | Additional parameters. |
| -> m (f XAutoclaimStreamsResult) |
O(1) if count is small. Transfers ownership of pending stream entries that match
the specified criteria. See xautoclaim for details.
Allows to pass additional optional parameters to set limit.
XAUTOCLAIM <stream name> <consumer group name> <min idle time> <start> COUNT <count>
Since Redis 7.0: fails on the ealier versions.
newtype XAutoclaimOpts Source #
Additional parameters.
Constructors
| XAutoclaimOpts | |
Fields
| |
type XAutoclaimStreamsResult = XAutoclaimResult StreamsRecord Source #
Version of the autoclaim result that contains data of the messages.
data XAutoclaimResult resultFormat Source #
Result of the xautoclaim family of calls
Constructors
| XAutoclaimResult | |
Fields
| |
Instances
| Show resultFormat => Show (XAutoclaimResult resultFormat) Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> XAutoclaimResult resultFormat -> ShowS # show :: XAutoclaimResult resultFormat -> String # showList :: [XAutoclaimResult resultFormat] -> ShowS # | |
| Eq resultFormat => Eq (XAutoclaimResult resultFormat) Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: XAutoclaimResult resultFormat -> XAutoclaimResult resultFormat -> Bool # (/=) :: XAutoclaimResult resultFormat -> XAutoclaimResult resultFormat -> Bool # | |
| RedisResult a => RedisResult (XAutoclaimResult a) Source # | |
Defined in Database.Redis.ManualCommands | |
Arguments
| :: RedisCtx m f | |
| => ByteString | Stream name. |
| -> ByteString | Consumer group name. |
| -> ByteString | Consumer name. |
| -> Integer | Min idle time (ms). |
| -> ByteString | start ID. |
| -> m (f XAutoclaimJustIdsResult) |
O(1) Transfers ownership of pending stream entries that match
the specified criteria. See xautoclaim for more details about criteria.
This variant returns only id of the messages without data. This method
claims no more than 100 messages, see xautoclaimJustIdsOpts for changing
this default.
XAUTOCLAIM <stream name> <consumer group name> <min idle time> <start> JUSTID
Since Redis 7.0: fails on the ealier versions.
xautoclaimJustIdsOpts Source #
Arguments
| :: RedisCtx m f | |
| => ByteString | Stream name. |
| -> ByteString | Consumers group name. |
| -> ByteString | Consumer namee. |
| -> Integer | min idle time (ms). |
| -> ByteString | Start ID. |
| -> XAutoclaimOpts | Additional parametres. |
| -> m (f XAutoclaimJustIdsResult) |
O(1) if count is small Transfers ownership of pending stream entries that match
the specified criteria. See xautoclaim for more details about criteria.
This variant returns only id of the messages without data and allows to set the maximum number of messages to be claimed.
XAUTOCLAIM <stream name> <consumer group name> <min idle time> <start> COUNT <count> JUSTID
Since Redis 7.0: fails on the ealier versions.
type XAutoclaimJustIdsResult = XAutoclaimResult ByteString Source #
Version of the autoclaim result that contains only IDs.
data XInfoConsumersResponse Source #
Data structure that is returned as a result of xinfoConsumers
Constructors
| XInfoConsumersResponse | |
Fields
| |
Instances
| Show XInfoConsumersResponse Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> XInfoConsumersResponse -> ShowS # show :: XInfoConsumersResponse -> String # showList :: [XInfoConsumersResponse] -> ShowS # | |
| Eq XInfoConsumersResponse Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: XInfoConsumersResponse -> XInfoConsumersResponse -> Bool # (/=) :: XInfoConsumersResponse -> XInfoConsumersResponse -> Bool # | |
| RedisResult XInfoConsumersResponse Source # | |
Defined in Database.Redis.ManualCommands | |
Arguments
| :: RedisCtx m f | |
| => ByteString | Stream name. |
| -> ByteString | Group name. |
| -> m (f [XInfoConsumersResponse]) |
O(1) Returns information about the list of the consumers beloging to the consumer group.
Available since Redis 5.0.0
Wrapper over XINFO CONSUMERS <stream name> <group name>
data XInfoGroupsResponse Source #
Result of the xinfoGroups call.
Constructors
| XInfoGroupsResponse | |
Fields
| |
Instances
| Show XInfoGroupsResponse Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> XInfoGroupsResponse -> ShowS # show :: XInfoGroupsResponse -> String # showList :: [XInfoGroupsResponse] -> ShowS # | |
| Eq XInfoGroupsResponse Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: XInfoGroupsResponse -> XInfoGroupsResponse -> Bool # (/=) :: XInfoGroupsResponse -> XInfoGroupsResponse -> Bool # | |
| RedisResult XInfoGroupsResponse Source # | |
Defined in Database.Redis.ManualCommands | |
Arguments
| :: RedisCtx m f | |
| => ByteString | Stream name. |
| -> m (f [XInfoGroupsResponse]) |
O(1) Returns information about the groups.
Available since: Redis 5.0.0
Wrapper around XINFO GROUPS <stream name> call.
data XInfoStreamResponse Source #
Constructors
| XInfoStreamResponse | |
Fields
| |
| XInfoStreamEmptyResponse | |
Fields
| |
Instances
| Show XInfoStreamResponse Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> XInfoStreamResponse -> ShowS # show :: XInfoStreamResponse -> String # showList :: [XInfoStreamResponse] -> ShowS # | |
| Eq XInfoStreamResponse Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: XInfoStreamResponse -> XInfoStreamResponse -> Bool # (/=) :: XInfoStreamResponse -> XInfoStreamResponse -> Bool # | |
| RedisResult XInfoStreamResponse Source # | |
Defined in Database.Redis.ManualCommands | |
Arguments
| :: RedisCtx m f | |
| => ByteString | stream |
| -> m (f XInfoStreamResponse) |
Get info about a stream. The Redis command XINFO is split into xinfoConsumers, xinfoGroups, and xinfoStream.
Since Redis 5.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | stream |
| -> NonEmpty ByteString | message IDs |
| -> m (f Integer) |
Delete messages from a stream. Since Redis 5.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Stream name. |
| -> NonEmpty ByteString | Entry IDs. |
| -> m (f [XEntryDeletionResult]) |
Conditionally deletes entries from a stream (https://redis.io/commands/xdelex).
O(1) for each entry ID processed.
Since Redis 8.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Stream name. |
| -> NonEmpty ByteString | Entry IDs. |
| -> XEntryDeletionOpts | Additional options. |
| -> m (f [XEntryDeletionResult]) |
Conditionally deletes entries from a stream (https://redis.io/commands/xdelex).
O(1) for each entry ID processed.
Since Redis 8.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | stream |
| -> TrimOpts | |
| -> m (f Integer) |
Set the upper bound for number of messages in a stream. Since Redis 5.0.0
Constructors
| GeoMeters | |
| GeoKilometers | |
| GeoFeet | |
| GeoMiles |
data GeoCoordinates Source #
Constructors
| GeoCoordinates | |
Fields
| |
Instances
| Show GeoCoordinates Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> GeoCoordinates -> ShowS # show :: GeoCoordinates -> String # showList :: [GeoCoordinates] -> ShowS # | |
| Eq GeoCoordinates Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: GeoCoordinates -> GeoCoordinates -> Bool # (/=) :: GeoCoordinates -> GeoCoordinates -> Bool # | |
| RedisResult GeoCoordinates Source # | |
Defined in Database.Redis.ManualCommands | |
data GeoLocation Source #
Constructors
| GeoLocation | |
Instances
| Show GeoLocation Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> GeoLocation -> ShowS # show :: GeoLocation -> String # showList :: [GeoLocation] -> ShowS # | |
| Eq GeoLocation Source # | |
Defined in Database.Redis.ManualCommands | |
| RedisResult GeoLocation Source # | |
Defined in Database.Redis.ManualCommands | |
data GeoSearchFrom Source #
Constructors
| GeoSearchFromMember ByteString | |
| GeoSearchFromLonLat Double Double |
Instances
| Show GeoSearchFrom Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> GeoSearchFrom -> ShowS # show :: GeoSearchFrom -> String # showList :: [GeoSearchFrom] -> ShowS # | |
| Eq GeoSearchFrom Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: GeoSearchFrom -> GeoSearchFrom -> Bool # (/=) :: GeoSearchFrom -> GeoSearchFrom -> Bool # | |
data GeoSearchBy Source #
Constructors
| GeoSearchByRadius Double GeoUnit | |
| GeoSearchByBox Double Double GeoUnit |
Instances
| Show GeoSearchBy Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> GeoSearchBy -> ShowS # show :: GeoSearchBy -> String # showList :: [GeoSearchBy] -> ShowS # | |
| Eq GeoSearchBy Source # | |
Defined in Database.Redis.ManualCommands | |
data GeoSearchOpts Source #
Constructors
| GeoSearchOpts | |
Fields | |
Instances
| Show GeoSearchOpts Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> GeoSearchOpts -> ShowS # show :: GeoSearchOpts -> String # showList :: [GeoSearchOpts] -> ShowS # | |
| Eq GeoSearchOpts Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: GeoSearchOpts -> GeoSearchOpts -> Bool # (/=) :: GeoSearchOpts -> GeoSearchOpts -> Bool # | |
data GeoSearchStoreOpts Source #
Constructors
| GeoSearchStoreOpts | |
Instances
| Show GeoSearchStoreOpts Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> GeoSearchStoreOpts -> ShowS # show :: GeoSearchStoreOpts -> String # showList :: [GeoSearchStoreOpts] -> ShowS # | |
| Eq GeoSearchStoreOpts Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: GeoSearchStoreOpts -> GeoSearchStoreOpts -> Bool # (/=) :: GeoSearchStoreOpts -> GeoSearchStoreOpts -> Bool # | |
data GeoAddOpts Source #
Adds one or more members to a geospatial index (https://redis.io/commands/geoadd). The Redis command GEOADD is split up into geoadd and geoAddOpts. Since Redis 3.2.0
Constructors
| GeoAddOpts | |
Fields
| |
Instances
| Show GeoAddOpts Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> GeoAddOpts -> ShowS # show :: GeoAddOpts -> String # showList :: [GeoAddOpts] -> ShowS # | |
| Eq GeoAddOpts Source # | |
Defined in Database.Redis.ManualCommands | |
defaultGeoAddOpts :: GeoAddOpts Source #
Redis default GeoAddOpts. Equivalent to omitting all optional parameters.
geoadd :: RedisCtx m f => ByteString -> [(Double, Double, ByteString)] -> m (f Integer) Source #
Adds one or more members to a geospatial index (https://redis.io/commands/geoadd).
The Redis command GEOADD is split up into geoadd and geoAddOpts.
Note: there is no geodel command because you can use zrem to remove elements.
The Geo index structure is just a sorted set.
Since Redis 3.2.0
Redis tags: write, geo, slow
geoaddOpts :: RedisCtx m f => ByteString -> [(Double, Double, ByteString)] -> GeoAddOpts -> m (f Integer) Source #
Adds one or more members to a geospatial index (https://redis.io/commands/geoadd).
The Redis command GEOADD is split up into geoadd and geoAddOpts.
Since Redis 6.2.0
geodist :: RedisCtx m f => ByteString -> ByteString -> ByteString -> Maybe GeoUnit -> m (f (Maybe Double)) Source #
Returns the distance between two members of a geospatial index (https://redis.io/commands/geodist). Since Redis 3.2.0
Redis tags: read, geo, slow
geopos :: RedisCtx m f => ByteString -> [ByteString] -> m (f [Maybe GeoCoordinates]) Source #
Returns the longitude and latitude of members from a geospatial index (https://redis.io/commands/geopos). Since Redis 3.2.0
ACL categories: read, geo, @slow.
geoSearch :: RedisCtx m f => ByteString -> GeoSearchFrom -> GeoSearchBy -> GeoSearchOpts -> m (f [GeoLocation]) Source #
Queries a geospatial index for members inside an area of a box or a circle (https://redis.io/commands/geosearch). Since Redis 6.2.0
O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape
ACL: read, geo, @slow
Since: Redis 6.2.0
geoSearchStore :: RedisCtx m f => ByteString -> ByteString -> GeoSearchFrom -> GeoSearchBy -> GeoSearchStoreOpts -> m (f Integer) Source #
Queries a geospatial index for members inside an area of a box or a circle, optionally stores the result (https://redis.io/commands/geosearchstore). Since Redis 6.2.0
data ClusterInfoResponse Source #
Constructors
| ClusterInfoResponse | |
Fields
| |
Instances
| Show ClusterInfoResponse Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> ClusterInfoResponse -> ShowS # show :: ClusterInfoResponse -> String # showList :: [ClusterInfoResponse] -> ShowS # | |
| Eq ClusterInfoResponse Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: ClusterInfoResponse -> ClusterInfoResponse -> Bool # (/=) :: ClusterInfoResponse -> ClusterInfoResponse -> Bool # | |
| RedisResult ClusterInfoResponse Source # | |
Defined in Database.Redis.ManualCommands | |
clusterInfo :: RedisCtx m f => m (f ClusterInfoResponse) Source #
clusterMyshardid :: RedisCtx m f => m (f ByteString) Source #
data ClusterNodesResponse Source #
Constructors
| ClusterNodesResponse | |
Instances
| Show ClusterNodesResponse Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> ClusterNodesResponse -> ShowS # show :: ClusterNodesResponse -> String # showList :: [ClusterNodesResponse] -> ShowS # | |
| Eq ClusterNodesResponse Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: ClusterNodesResponse -> ClusterNodesResponse -> Bool # (/=) :: ClusterNodesResponse -> ClusterNodesResponse -> Bool # | |
| RedisResult ClusterNodesResponse Source # | |
Defined in Database.Redis.ManualCommands | |
data ClusterNodesResponseEntry Source #
Constructors
| ClusterNodesResponseEntry | |
Fields
| |
Instances
| Show ClusterNodesResponseEntry Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> ClusterNodesResponseEntry -> ShowS # show :: ClusterNodesResponseEntry -> String # showList :: [ClusterNodesResponseEntry] -> ShowS # | |
| Eq ClusterNodesResponseEntry Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: ClusterNodesResponseEntry -> ClusterNodesResponseEntry -> Bool # (/=) :: ClusterNodesResponseEntry -> ClusterNodesResponseEntry -> Bool # | |
data ClusterNodesResponseSlotSpec Source #
Constructors
| ClusterNodesResponseSingleSlot Integer | |
| ClusterNodesResponseSlotRange Integer Integer | |
| ClusterNodesResponseSlotImporting Integer ByteString | |
| ClusterNodesResponseSlotMigrating Integer ByteString |
Instances
| Show ClusterNodesResponseSlotSpec Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> ClusterNodesResponseSlotSpec -> ShowS # show :: ClusterNodesResponseSlotSpec -> String # showList :: [ClusterNodesResponseSlotSpec] -> ShowS # | |
| Eq ClusterNodesResponseSlotSpec Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: ClusterNodesResponseSlotSpec -> ClusterNodesResponseSlotSpec -> Bool # (/=) :: ClusterNodesResponseSlotSpec -> ClusterNodesResponseSlotSpec -> Bool # | |
clusterNodes :: RedisCtx m f => m (f ClusterNodesResponse) Source #
data ClusterSlotsResponse Source #
Constructors
| ClusterSlotsResponse | |
Instances
| Show ClusterSlotsResponse Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> ClusterSlotsResponse -> ShowS # show :: ClusterSlotsResponse -> String # showList :: [ClusterSlotsResponse] -> ShowS # | |
| RedisResult ClusterSlotsResponse Source # | |
Defined in Database.Redis.ManualCommands | |
data ClusterSlotsResponseEntry Source #
Constructors
| ClusterSlotsResponseEntry | |
Instances
| Show ClusterSlotsResponseEntry Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> ClusterSlotsResponseEntry -> ShowS # show :: ClusterSlotsResponseEntry -> String # showList :: [ClusterSlotsResponseEntry] -> ShowS # | |
| RedisResult ClusterSlotsResponseEntry Source # | |
Defined in Database.Redis.ManualCommands | |
data ClusterSlotsNode Source #
Constructors
| ClusterSlotsNode | |
Fields | |
Instances
| Show ClusterSlotsNode Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> ClusterSlotsNode -> ShowS # show :: ClusterSlotsNode -> String # showList :: [ClusterSlotsNode] -> ShowS # | |
| RedisResult ClusterSlotsNode Source # | |
Defined in Database.Redis.ManualCommands | |
clusterSlots :: RedisCtx m f => m (f ClusterSlotsResponse) Source #
data ClusterSlotStatsMetric Source #
Constructors
| ClusterSlotStatsKeyCount | |
| ClusterSlotStatsCpuUsec | |
| ClusterSlotStatsMemoryBytes | |
| ClusterSlotStatsNetworkBytesIn | |
| ClusterSlotStatsNetworkBytesOut |
Instances
| Show ClusterSlotStatsMetric Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> ClusterSlotStatsMetric -> ShowS # show :: ClusterSlotStatsMetric -> String # showList :: [ClusterSlotStatsMetric] -> ShowS # | |
| Eq ClusterSlotStatsMetric Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: ClusterSlotStatsMetric -> ClusterSlotStatsMetric -> Bool # (/=) :: ClusterSlotStatsMetric -> ClusterSlotStatsMetric -> Bool # | |
| RedisArg ClusterSlotStatsMetric Source # | |
Defined in Database.Redis.ManualCommands Methods | |
data ClusterSlotStatsOrderByOpts Source #
Constructors
| ClusterSlotStatsOrderByOpts | |
Instances
| Show ClusterSlotStatsOrderByOpts Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> ClusterSlotStatsOrderByOpts -> ShowS # show :: ClusterSlotStatsOrderByOpts -> String # showList :: [ClusterSlotStatsOrderByOpts] -> ShowS # | |
| Eq ClusterSlotStatsOrderByOpts Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: ClusterSlotStatsOrderByOpts -> ClusterSlotStatsOrderByOpts -> Bool # (/=) :: ClusterSlotStatsOrderByOpts -> ClusterSlotStatsOrderByOpts -> Bool # | |
data ClusterSlotStatsQuery Source #
Constructors
| ClusterSlotStatsSlotsRange Integer Integer | |
| ClusterSlotStatsOrderBy ClusterSlotStatsMetric ClusterSlotStatsOrderByOpts |
Instances
| Show ClusterSlotStatsQuery Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> ClusterSlotStatsQuery -> ShowS # show :: ClusterSlotStatsQuery -> String # showList :: [ClusterSlotStatsQuery] -> ShowS # | |
| Eq ClusterSlotStatsQuery Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: ClusterSlotStatsQuery -> ClusterSlotStatsQuery -> Bool # (/=) :: ClusterSlotStatsQuery -> ClusterSlotStatsQuery -> Bool # | |
data ClusterSlotStatsResponse Source #
Constructors
| ClusterSlotStatsResponse | |
Instances
| Show ClusterSlotStatsResponse Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> ClusterSlotStatsResponse -> ShowS # show :: ClusterSlotStatsResponse -> String # showList :: [ClusterSlotStatsResponse] -> ShowS # | |
| Eq ClusterSlotStatsResponse Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: ClusterSlotStatsResponse -> ClusterSlotStatsResponse -> Bool # (/=) :: ClusterSlotStatsResponse -> ClusterSlotStatsResponse -> Bool # | |
| RedisResult ClusterSlotStatsResponse Source # | |
Defined in Database.Redis.ManualCommands | |
data ClusterSlotStatsResponseEntry Source #
Constructors
| ClusterSlotStatsResponseEntry | |
Fields
| |
Instances
| Show ClusterSlotStatsResponseEntry Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> ClusterSlotStatsResponseEntry -> ShowS # show :: ClusterSlotStatsResponseEntry -> String # showList :: [ClusterSlotStatsResponseEntry] -> ShowS # | |
| Eq ClusterSlotStatsResponseEntry Source # | |
Defined in Database.Redis.ManualCommands | |
| RedisResult ClusterSlotStatsResponseEntry Source # | |
Defined in Database.Redis.ManualCommands | |
clusterSlotStats :: RedisCtx m f => ClusterSlotStatsQuery -> m (f ClusterSlotStatsResponse) Source #
clusterSlotStatsSlotsRange :: RedisCtx m f => Integer -> Integer -> m (f ClusterSlotStatsResponse) Source #
clusterSlotStatsOrderBy :: RedisCtx m f => ClusterSlotStatsMetric -> m (f ClusterSlotStatsResponse) Source #
clusterSlotStatsOrderByOpts :: RedisCtx m f => ClusterSlotStatsMetric -> ClusterSlotStatsOrderByOpts -> m (f ClusterSlotStatsResponse) Source #
data ClusterMigrationSlotRange Source #
Constructors
| ClusterMigrationSlotRange | |
Instances
| Show ClusterMigrationSlotRange Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> ClusterMigrationSlotRange -> ShowS # show :: ClusterMigrationSlotRange -> String # showList :: [ClusterMigrationSlotRange] -> ShowS # | |
| Eq ClusterMigrationSlotRange Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: ClusterMigrationSlotRange -> ClusterMigrationSlotRange -> Bool # (/=) :: ClusterMigrationSlotRange -> ClusterMigrationSlotRange -> Bool # | |
data ClusterMigrationTask Source #
Constructors
| ClusterMigrationTask | |
Fields
| |
Instances
| Show ClusterMigrationTask Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> ClusterMigrationTask -> ShowS # show :: ClusterMigrationTask -> String # showList :: [ClusterMigrationTask] -> ShowS # | |
| Eq ClusterMigrationTask Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: ClusterMigrationTask -> ClusterMigrationTask -> Bool # (/=) :: ClusterMigrationTask -> ClusterMigrationTask -> Bool # | |
| RedisResult ClusterMigrationTask Source # | |
Defined in Database.Redis.ManualCommands | |
newtype ClusterMigrationStatusResponse Source #
Constructors
| ClusterMigrationStatusResponse | |
Fields | |
Instances
| Show ClusterMigrationStatusResponse Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> ClusterMigrationStatusResponse -> ShowS # show :: ClusterMigrationStatusResponse -> String # showList :: [ClusterMigrationStatusResponse] -> ShowS # | |
| Eq ClusterMigrationStatusResponse Source # | |
Defined in Database.Redis.ManualCommands | |
| RedisResult ClusterMigrationStatusResponse Source # | |
Defined in Database.Redis.ManualCommands | |
clusterMigrationImport Source #
Arguments
| :: RedisCtx m f | |
| => NonEmpty (Integer, Integer) | Slot ranges to import. Execute this subcommand on the destination master. It accepts multiple slot ranges and returns a task ID that can later be used to monitor the migration. |
| -> m (f ByteString) |
Starts an atomic slot migration import task on the current node (https://redis.io/commands/cluster-migration).
O(N) where N is the total number of slots between the specified start and end slot arguments.
Since Redis 8.4.0
clusterMigrationCancelId Source #
Arguments
| :: RedisCtx m f | |
| => ByteString | Task identifier. |
| -> m (f Integer) |
Cancels an ongoing migration task by task ID (https://redis.io/commands/cluster-migration).
O(N) where N is the total number of slots between the specified start and end slot arguments.
Since Redis 8.4.0
clusterMigrationCancelAll :: RedisCtx m f => m (f Integer) Source #
Cancels all ongoing migration tasks (https://redis.io/commands/cluster-migration).
O(N) where N is the total number of slots between the specified start and end slot arguments.
Since Redis 8.4.0
clusterMigrationStatus :: RedisCtx m f => m (f ClusterMigrationStatusResponse) Source #
Returns the status of current and completed atomic slot migration tasks (https://redis.io/commands/cluster-migration).
O(N) where N is the total number of slots between the specified start and end slot arguments.
Since Redis 8.4.0
clusterMigrationStatusAll :: RedisCtx m f => m (f ClusterMigrationStatusResponse) Source #
Returns the status of all current and completed atomic slot migration tasks (https://redis.io/commands/cluster-migration).
O(N) where N is the total number of slots between the specified start and end slot arguments.
Since Redis 8.4.0
clusterMigrationStatusId Source #
Arguments
| :: RedisCtx m f | |
| => ByteString | Task identifier. |
| -> m (f ClusterMigrationStatusResponse) |
Returns the status of a specific atomic slot migration task (https://redis.io/commands/cluster-migration).
O(N) where N is the total number of slots between the specified start and end slot arguments.
Since Redis 8.4.0
clusterSetSlotNode :: RedisCtx m f => Integer -> ByteString -> m (f Status) Source #
clusterSetSlotImporting :: RedisCtx m f => Integer -> ByteString -> m (f Status) Source #
clusterSetSlotMigrating :: RedisCtx m f => Integer -> ByteString -> m (f Status) Source #
clusterGetKeysInSlot :: RedisCtx m f => Integer -> Integer -> m (f [ByteString]) Source #
command :: RedisCtx m f => m (f [CommandInfo]) Source #
Arguments
| :: RedisCtx m f | |
| => ByteString | Library name. |
| -> m (f Status) |
Deletes a library and its functions (https://redis.io/commands/function-delete).
Deletes the library named by the argument together with all functions it contains.
O(1)
Since Redis 7.0.0
functionDump :: RedisCtx m f => m (f ByteString) Source #
Dumps all libraries into a serialized binary payload (https://redis.io/commands/function-dump).
Serializes all loaded libraries into a binary payload that can later be used with functionRestore.
O(N) where N is the number of functions.
Since Redis 7.0.0
functionFlush :: RedisCtx m f => m (f Status) Source #
Deletes all libraries and functions (https://redis.io/commands/function-flush).
Removes every library currently loaded into Redis.
O(N) where N is the number of functions deleted.
Since Redis 7.0.0
Deletes all libraries and functions (https://redis.io/commands/function-flush).
Removes every library currently loaded into Redis using the requested flushing mode.
O(N) where N is the number of functions deleted.
Since Redis 7.0.0
functionKill :: RedisCtx m f => m (f Status) Source #
Terminates a function during execution (https://redis.io/commands/function-kill).
Terminates the currently running function, if it is marked as killable by Redis.
O(1)
Since Redis 7.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Library source code. |
| -> m (f ByteString) |
Creates a library (https://redis.io/commands/function-load).
Loads a new function library and returns its library name.
O(N) where N is the number of bytes in the function's source code.
Since Redis 7.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Library source code. |
| -> m (f ByteString) |
Creates a library, replacing an existing one with the same name (https://redis.io/commands/function-load).
Loads a function library and replaces an existing library with the same name.
O(N) where N is the number of bytes in the function's source code.
Since Redis 7.0.0
data FunctionRestorePolicy Source #
Instances
| Show FunctionRestorePolicy Source # | |
Defined in Database.Redis.ManualCommands Methods showsPrec :: Int -> FunctionRestorePolicy -> ShowS # show :: FunctionRestorePolicy -> String # showList :: [FunctionRestorePolicy] -> ShowS # | |
| Eq FunctionRestorePolicy Source # | |
Defined in Database.Redis.ManualCommands Methods (==) :: FunctionRestorePolicy -> FunctionRestorePolicy -> Bool # (/=) :: FunctionRestorePolicy -> FunctionRestorePolicy -> Bool # | |
| RedisArg FunctionRestorePolicy Source # | |
Defined in Database.Redis.ManualCommands Methods | |
data FunctionRestoreOpts Source #
Instances
| Show FunctionRestoreOpts Source # | |
Defined in Database.Redis.ManualCommands.Function Methods showsPrec :: Int -> FunctionRestoreOpts -> ShowS # show :: FunctionRestoreOpts -> String # showList :: [FunctionRestoreOpts] -> ShowS # | |
| Eq FunctionRestoreOpts Source # | |
Defined in Database.Redis.ManualCommands.Function Methods (==) :: FunctionRestoreOpts -> FunctionRestoreOpts -> Bool # (/=) :: FunctionRestoreOpts -> FunctionRestoreOpts -> Bool # | |
Arguments
| :: RedisCtx m f | |
| => ByteString | Serialized libraries payload. |
| -> m (f Status) |
Restores all libraries from a payload (https://redis.io/commands/function-restore).
Restores all libraries from a payload previously returned by functionDump.
O(N) where N is the number of functions restored.
Since Redis 7.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Serialized libraries payload. |
| -> FunctionRestoreOpts | Restore options. |
| -> m (f Status) |
Restores all libraries from a payload (https://redis.io/commands/function-restore).
Restores all libraries from a payload previously returned by functionDump, optionally selecting the restore policy.
O(N) where N is the number of functions restored.
Since Redis 7.0.0
functionStats :: RedisCtx m f => m (f Reply) Source #
Returns information about a function during execution (https://redis.io/commands/function-stats).
Returns execution statistics and runtime information for the function engine.
O(1)
Since Redis 7.0.0
data WaitAofResult Source #
Constructors
| WaitAofResult | |
Fields
| |
Instances
| Show WaitAofResult Source # | |
Defined in Database.Redis.ManualCommands.Wait Methods showsPrec :: Int -> WaitAofResult -> ShowS # show :: WaitAofResult -> String # showList :: [WaitAofResult] -> ShowS # | |
| Eq WaitAofResult Source # | |
Defined in Database.Redis.ManualCommands.Wait Methods (==) :: WaitAofResult -> WaitAofResult -> Bool # (/=) :: WaitAofResult -> WaitAofResult -> Bool # | |
| RedisResult WaitAofResult Source # | |
Defined in Database.Redis.ManualCommands.Wait | |
Arguments
| :: RedisCtx m f | |
| => Integer | Number of local Redis instances to wait for AOF fsync on ( |
| -> Integer | Number of replicas to wait for AOF fsync on. |
| -> Integer | Maximum time to wait in milliseconds. |
| -> m (f WaitAofResult) |
O(1) Wait for preceding writes to be fsynced to the append-only file locally and/or on replicas (https://redis.io/commands/waitaof).
Blocks until all of the preceding write commands sent by the connection are written to the append-only file of the master and/or replicas.
Since Redis 7.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | channel |
| -> ByteString | message |
| -> m (f Integer) |
Post a message to a channel (http://redis.io/commands/publish).
Listens to published messages on subscribed channels and channels matching the subscribed patterns. For documentation on the semantics of Redis Pub/Sub see http://redis.io/topics/pubsub.
The given callback function is called for each received message.
Subscription changes are triggered by the returned PubSub. To keep
subscriptions unchanged, the callback can return mempty.
Example: Subscribe to the "news" channel indefinitely.
pubSub (subscribe ["news"]) $ \msg -> do
putStrLn $ "Message from " ++ show (msgChannel msg)
return mempty
Example: Receive a single message from the "chat" channel.
pubSub (subscribe ["chat"]) $ \msg -> do
putStrLn $ "Message from " ++ show (msgChannel msg)
return $ unsubscribe ["chat"]
It should be noted that Redis Pub/Sub by its nature is asynchronous
so returning unsubscribe does not mean that callback won't be able
to receive any further messages. And to guarantee that you won't
won't process messages after unsubscription and won't unsubscribe
from the same channel more than once you need to use IORef or
something similar
Arguments
| :: [ByteString] | channel |
| -> PubSub |
Listen for messages published to the given channels (http://redis.io/commands/subscribe).
Arguments
| :: [ByteString] | channel |
| -> PubSub |
Stop listening for messages posted to the given channels (http://redis.io/commands/unsubscribe).
Arguments
| :: [ByteString] | pattern |
| -> PubSub |
Listen for messages published to channels matching the given patterns (http://redis.io/commands/psubscribe).
Arguments
| :: [ByteString] | pattern |
| -> PubSub |
Stop listening for messages posted to channels matching the given patterns (http://redis.io/commands/punsubscribe).
Arguments
| :: Connection | The connection pool |
| -> PubSubController | The controller which keeps track of all subscriptions and handlers |
| -> IO () | This action is executed once Redis acknowledges that all the subscriptions in
the controller are now subscribed. You can use this after an exception (such as
|
| -> IO () |
Open a connection to the Redis server, register to all channels in the PubSubController,
and process messages and subscription change requests forever. The only way this will ever
exit is if there is an exception from the network code or an unhandled exception
in a MessageCallback or PMessageCallback. For example, if the network connection to Redis
dies, pubSubForever will throw a ConnectionLost. When such an exception is
thrown, you can recall pubSubForever with the same PubSubController which will open a
new connection and resubscribe to all the channels which are tracked in the PubSubController.
The general pattern is therefore during program startup create a PubSubController and fork
a thread which calls pubSubForever in a loop (using an exponential backoff algorithm
such as the retry package to not hammer the Redis
server if it does die). For example,
myhandler :: ByteString -> IO ()
myhandler msg = putStrLn $ unpack $ decodeUtf8 msg
onInitialComplete :: IO ()
onInitialComplete = putStrLn "Redis acknowledged that mychannel is now subscribed"
main :: IO ()
main = do
conn <- connect defaultConnectInfo
pubSubCtrl <- newPubSubController [("mychannel", myhandler)] []
concurrently ( forever $
pubSubForever conn pubSubCtrl onInitialComplete
`catch` (\(e :: SomeException) -> do
putStrLn $ "Got error: " ++ show e
threadDelay $ 50*1000) -- TODO: use exponential backoff
) $ restOfYourProgram
{- elsewhere in your program, use pubSubCtrl to change subscriptions -}
At most one active pubSubForever can be running against a single PubSubController at any time. If
two active calls to pubSubForever share a single PubSubController there will be deadlocks. If
you do want to process messages using multiple connections to Redis, you can create more than one
PubSubController. For example, create one PubSubController for each getNumCapabilities
and then create a Haskell thread bound to each capability each calling pubSubForever in a loop.
This will create one network connection per controller/capability and allow you to
register separate channels and callbacks for each controller, spreading the load across the capabilities.
type RedisChannel = ByteString Source #
A Redis channel name
type RedisPChannel = ByteString Source #
A Redis pattern channel name
type MessageCallback = ByteString -> IO () Source #
A handler for a message from a subscribed channel. The callback is passed the message content.
Messages are processed synchronously in the receiving thread, so if the callback
takes a long time it will block other callbacks and other messages from being
received. If you need to move long-running work to a different thread, we suggest
you use TBQueue with a reasonable bound, so that if messages are arriving faster
than you can process them, you do eventually block.
If the callback throws an exception, the exception will be thrown from pubSubForever
which will cause the entire Redis connection for all subscriptions to be closed.
As long as you call pubSubForever in a loop you will reconnect to your subscribed
channels, but you should probably add an exception handler to each callback to
prevent this.
type PMessageCallback = RedisChannel -> ByteString -> IO () Source #
A handler for a message from a psubscribed channel. The callback is passed the channel the message was sent on plus the message content.
Similar to MessageCallback, callbacks are executed synchronously and any exceptions
are rethrown from pubSubForever.
data PubSubController Source #
A controller that stores a set of channels, pattern channels, and callbacks.
It allows you to manage Pub/Sub subscriptions and pattern subscriptions and alter them at
any time throughout the life of your program.
You should typically create the controller at the start of your program and then store it
through the life of your program, using addChannels and removeChannels to update the
current subscriptions.
Arguments
| :: MonadIO m | |
| => [(RedisChannel, MessageCallback)] | the initial subscriptions |
| -> [(RedisPChannel, PMessageCallback)] | the initial pattern subscriptions |
| -> m PubSubController |
Create a new PubSubController. Note that this does not subscribe to any channels, it just
creates the controller. The subscriptions will happen once pubSubForever is called.
currentChannels :: FunctorMonadIO m => PubSubController -> m [RedisChannel] Source #
Get the list of current channels in the PubSubController. WARNING! This might not
exactly reflect the subscribed channels in the Redis server, because there is a delay
between adding or removing a channel in the PubSubController and when Redis receives
and processes the subscription change request.
currentPChannels :: FunctorMonadIO m => PubSubController -> m [RedisPChannel] Source #
Get the list of current pattern channels in the PubSubController. WARNING! This might not
exactly reflect the subscribed channels in the Redis server, because there is a delay
between adding or removing a channel in the PubSubController and when Redis receives
and processes the subscription change request.
Arguments
| :: MonadIO m | |
| => PubSubController | |
| -> [(RedisChannel, MessageCallback)] | the channels to subscribe to |
| -> [(RedisPChannel, PMessageCallback)] | the channels to pattern subscribe to |
| -> m UnregisterCallbacksAction |
Add channels into the PubSubController, and if there is an active pubSubForever, send the subscribe
and psubscribe commands to Redis. The addChannels function is thread-safe. This function
does not wait for Redis to acknowledge that the channels have actually been subscribed; use
addChannelsAndWait for that.
You can subscribe to the same channel or pattern channel multiple times; the PubSubController keeps
a list of callbacks and executes each callback in response to a message.
The return value is an action UnregisterCallbacksAction which will unregister the callbacks,
which should typically used with bracket.
Arguments
| :: MonadIO m | |
| => PubSubController | |
| -> [(RedisChannel, MessageCallback)] | the channels to subscribe to |
| -> [(RedisPChannel, PMessageCallback)] | the channels to psubscribe to |
| -> m UnregisterCallbacksAction |
Call addChannels and then wait for Redis to acknowledge that the channels are actually subscribed.
Note that this function waits for requested subscription change requests, so if you for example call
addChannelsAndWait from multiple threads simultaneously, they will all wait their pending
subscription changes to be acknowledged by Redis.
This also correctly waits if the network connection dies during the subscription change. Say that the
network connection dies right after we send a subscription change to Redis. pubSubForever will throw
ConnectionLost and addChannelsAndWait will continue to wait. Once you recall pubSubForever
with the same PubSubController, pubSubForever will open a new connection, send subscription commands
for all channels in the PubSubController (which include the ones we are waiting for),
and wait for the responses from Redis. Only once we receive the response from Redis that it has subscribed
to all channels in PubSubController will addChannelsAndWait unblock and return.
removeChannels :: MonadIO m => PubSubController -> [RedisChannel] -> [RedisPChannel] -> m () Source #
Remove channels from the PubSubController, and if there is an active pubSubForever, send the
unsubscribe commands to Redis. Note that as soon as this function returns, no more callbacks will be
executed even if more messages arrive during the period when we request to unsubscribe from the channel
and Redis actually processes the unsubscribe request. This function is thread-safe.
If you remove all channels, the connection in pubSubForever to redis will stay open and waiting for
any new channels from a call to addChannels. If you really want to close the connection,
use killThread or cancel to kill the thread running
pubSubForever.
removeChannelsAndWait :: MonadIO m => PubSubController -> [RedisChannel] -> [RedisPChannel] -> m () Source #
Call removeChannels and then wait for all pending subscription change requests to be acknowledged
by Redis. This uses the same waiting logic as addChannelsAndWait. Since removeChannels immediately
notifies the PubSubController to start discarding messages, you likely don't need this function and
can just use removeChannels.
type UnregisterCallbacksAction = IO () Source #
An action that when executed will unregister the callbacks. It is returned from addChannels
or addChannelsAndWait and typically you would use it in bracket to guarantee that you
unsubscribe from channels. For example, if you are using websockets to distribute messages to
clients, you could use something such as:
websocketConn <- Network.WebSockets.acceptRequest pending
let mycallback msg = Network.WebSockets.sendTextData websocketConn msg
bracket (addChannelsAndWait ctrl [("hello", mycallback)] []) id $ const $ do
{- loop here calling Network.WebSockets.receiveData -}pendingChannels :: MonadIO m => PubSubController -> m (HashSet RedisChannel) Source #
pendingPatternChannels :: MonadIO m => PubSubController -> m (HashSet RedisPChannel) Source #
withPubSub :: Connection -> [ByteString] -> [ByteString] -> (STM Message -> IO r) -> IO r Source #
Creates a subscription and automatically unsubscribes when callback returns, this function keeps flow control in the callback, so it is useful for short-lived subscriptions, when the callback knows when to exit. The function is quite simple and does not make any attempts to handle connection loss.
Note that this function does not support changing subscriptions while it is running, so it is only useful for short-lived Pub/Sub connections.
An example of usage, that is hard to implement with pubSubForever is to subscribe to a channel:
withPubSub conn ["mychannel"] [] $ \waitMsg -> do
d <- registerDelay 1000000 -- 1 second (requires -threaded runtime)
atomically $ asum [ readTVar >>= guard >> return Nothing
, Just $ waitMsg
]
In case if connection is lost, user callback will receive BlockedIndefinitelyOnSTM exception.
Arguments
| :: [ByteString] | key |
| -> Redis (Either Reply Status) |
Watch the given keys to determine execution of the MULTI/EXEC block (http://redis.io/commands/watch).
unwatch :: Redis (Either Reply Status) Source #
Forget about all watched keys (http://redis.io/commands/unwatch).
multiExec :: RedisTx (Queued a) -> Redis (TxResult a) Source #
Run commands inside a transaction. For documentation on the semantics of Redis transaction see http://redis.io/topics/transactions.
Inside the transaction block, command functions return their result wrapped
in a Queued. The Queued result is a proxy object for the actual
command's result, which will only be available after EXECing the
transaction.
Example usage (note how Queued 's Applicative instance is used to
combine the two individual results):
runRedis conn $ do
set "hello" "hello"
set "world" "world"
helloworld <- multiExec $ do
hello <- get "hello"
world <- get "world"
return $ (,) <$> hello <*> world
liftIO (print helloworld)
A Queued value represents the result of a command inside a transaction. It
is a proxy object for the actual result, which will only be available
after returning from a multiExec transaction.
Queued values are composable by utilizing the Functor, Applicative or
Monad interfaces.
Result of a multiExec transaction.
Constructors
| TxSuccess a | Transaction completed successfully. The wrapped value corresponds to
the |
| TxAborted | Transaction aborted due to an earlier |
| TxError String | At least one of the commands returned an |
Instances
| NFData a => NFData (TxResult a) Source # | |||||
Defined in Database.Redis.Transactions | |||||
| Generic (TxResult a) Source # | |||||
Defined in Database.Redis.Transactions Associated Types
| |||||
| Show a => Show (TxResult a) Source # | |||||
| Eq a => Eq (TxResult a) Source # | |||||
| type Rep (TxResult a) Source # | |||||
Defined in Database.Redis.Transactions type Rep (TxResult a) = D1 ('MetaData "TxResult" "Database.Redis.Transactions" "hedis-0.16.2-inplace" 'False) (C1 ('MetaCons "TxSuccess" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: (C1 ('MetaCons "TxAborted" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TxError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))) | |||||
Command-context inside of MULTI/EXEC transactions. Use multiExec to run
actions of this type.
In the RedisTx context, all commands return a Queued value. It is a
proxy object for the actual result, which will only be available after
finishing the transaction.
Instances
| MonadIO RedisTx Source # | |
Defined in Database.Redis.Transactions | |
| Applicative RedisTx Source # | |
| Functor RedisTx Source # | |
| Monad RedisTx Source # | |
| MonadRedis RedisTx Source # | |
| RedisCtx RedisTx Queued Source # | |
Defined in Database.Redis.Transactions Methods returnDecode :: RedisResult a => Reply -> RedisTx (Queued a) Source # | |
Constructors
| TsSample | |
Fields | |
data TsEncoding Source #
Constructors
| TsUncompressed | |
| TsCompressed |
Instances
| Show TsEncoding Source # | |
Defined in Database.Redis.ManualCommands.Ts Methods showsPrec :: Int -> TsEncoding -> ShowS # show :: TsEncoding -> String # showList :: [TsEncoding] -> ShowS # | |
| Eq TsEncoding Source # | |
Defined in Database.Redis.ManualCommands.Ts | |
| RedisArg TsEncoding Source # | |
Defined in Database.Redis.ManualCommands.Ts Methods encode :: TsEncoding -> ByteString Source # | |
data TsDuplicatePolicy Source #
Constructors
| TsDuplicateBlock | |
| TsDuplicateFirst | |
| TsDuplicateLast | |
| TsDuplicateMin | |
| TsDuplicateMax | |
| TsDuplicateSum |
Instances
| Show TsDuplicatePolicy Source # | |
Defined in Database.Redis.ManualCommands.Ts Methods showsPrec :: Int -> TsDuplicatePolicy -> ShowS # show :: TsDuplicatePolicy -> String # showList :: [TsDuplicatePolicy] -> ShowS # | |
| Eq TsDuplicatePolicy Source # | |
Defined in Database.Redis.ManualCommands.Ts Methods (==) :: TsDuplicatePolicy -> TsDuplicatePolicy -> Bool # (/=) :: TsDuplicatePolicy -> TsDuplicatePolicy -> Bool # | |
| RedisArg TsDuplicatePolicy Source # | |
Defined in Database.Redis.ManualCommands.Ts Methods encode :: TsDuplicatePolicy -> ByteString Source # | |
data TsCreateOpts Source #
Constructors
| TsCreateOpts | |
Instances
| Show TsCreateOpts Source # | |
Defined in Database.Redis.ManualCommands.Ts Methods showsPrec :: Int -> TsCreateOpts -> ShowS # show :: TsCreateOpts -> String # showList :: [TsCreateOpts] -> ShowS # | |
| Eq TsCreateOpts Source # | |
Defined in Database.Redis.ManualCommands.Ts | |
data TsAlterOpts Source #
Constructors
| TsAlterOpts | |
Fields | |
Instances
| Show TsAlterOpts Source # | |
Defined in Database.Redis.ManualCommands.Ts Methods showsPrec :: Int -> TsAlterOpts -> ShowS # show :: TsAlterOpts -> String # showList :: [TsAlterOpts] -> ShowS # | |
| Eq TsAlterOpts Source # | |
Defined in Database.Redis.ManualCommands.Ts | |
data TsIncrByOpts Source #
Constructors
| TsIncrByOpts | |
Instances
| Show TsIncrByOpts Source # | |
Defined in Database.Redis.ManualCommands.Ts Methods showsPrec :: Int -> TsIncrByOpts -> ShowS # show :: TsIncrByOpts -> String # showList :: [TsIncrByOpts] -> ShowS # | |
| Eq TsIncrByOpts Source # | |
Defined in Database.Redis.ManualCommands.Ts | |
Constructors
| TsGetOpts | |
Fields
| |
data TsAggregator Source #
Constructors
| TsAggAvg | |
| TsAggFirst | |
| TsAggLast | |
| TsAggMin | |
| TsAggMax | |
| TsAggSum | |
| TsAggRange | |
| TsAggCount | |
| TsAggStdP | |
| TsAggStdS | |
| TsAggVarP | |
| TsAggVarS | |
| TsAggTwa | |
| TsAggCountNaN | |
| TsAggCountAll |
Instances
| Show TsAggregator Source # | |
Defined in Database.Redis.ManualCommands.Ts Methods showsPrec :: Int -> TsAggregator -> ShowS # show :: TsAggregator -> String # showList :: [TsAggregator] -> ShowS # | |
| Eq TsAggregator Source # | |
Defined in Database.Redis.ManualCommands.Ts | |
| RedisArg TsAggregator Source # | |
Defined in Database.Redis.ManualCommands.Ts Methods encode :: TsAggregator -> ByteString Source # | |
newtype TsAggregators Source #
Constructors
| TsAggregators | |
Fields | |
Instances
| Show TsAggregators Source # | |
Defined in Database.Redis.ManualCommands.Ts Methods showsPrec :: Int -> TsAggregators -> ShowS # show :: TsAggregators -> String # showList :: [TsAggregators] -> ShowS # | |
| Eq TsAggregators Source # | |
Defined in Database.Redis.ManualCommands.Ts Methods (==) :: TsAggregators -> TsAggregators -> Bool # (/=) :: TsAggregators -> TsAggregators -> Bool # | |
| RedisArg TsAggregators Source # | |
Defined in Database.Redis.ManualCommands.Ts Methods encode :: TsAggregators -> ByteString Source # | |
data TsBucketTimestamp Source #
Constructors
| TsBucketStart | |
| TsBucketEnd | |
| TsBucketMid |
Instances
| Show TsBucketTimestamp Source # | |
Defined in Database.Redis.ManualCommands.Ts Methods showsPrec :: Int -> TsBucketTimestamp -> ShowS # show :: TsBucketTimestamp -> String # showList :: [TsBucketTimestamp] -> ShowS # | |
| Eq TsBucketTimestamp Source # | |
Defined in Database.Redis.ManualCommands.Ts Methods (==) :: TsBucketTimestamp -> TsBucketTimestamp -> Bool # (/=) :: TsBucketTimestamp -> TsBucketTimestamp -> Bool # | |
| RedisArg TsBucketTimestamp Source # | |
Defined in Database.Redis.ManualCommands.Ts Methods encode :: TsBucketTimestamp -> ByteString Source # | |
data TsAggregationOpts Source #
Constructors
| TsAggregationOpts | |
Instances
| Show TsAggregationOpts Source # | |
Defined in Database.Redis.ManualCommands.Ts Methods showsPrec :: Int -> TsAggregationOpts -> ShowS # show :: TsAggregationOpts -> String # showList :: [TsAggregationOpts] -> ShowS # | |
| Eq TsAggregationOpts Source # | |
Defined in Database.Redis.ManualCommands.Ts Methods (==) :: TsAggregationOpts -> TsAggregationOpts -> Bool # (/=) :: TsAggregationOpts -> TsAggregationOpts -> Bool # | |
data TsRangeOpts Source #
Constructors
| TsRangeOpts | |
Fields | |
Instances
| Show TsRangeOpts Source # | |
Defined in Database.Redis.ManualCommands.Ts Methods showsPrec :: Int -> TsRangeOpts -> ShowS # show :: TsRangeOpts -> String # showList :: [TsRangeOpts] -> ShowS # | |
| Eq TsRangeOpts Source # | |
Defined in Database.Redis.ManualCommands.Ts | |
data TsLabelSelection Source #
Constructors
| TsWithLabels | |
| TsSelectedLabels (NonEmpty ByteString) |
Instances
| Show TsLabelSelection Source # | |
Defined in Database.Redis.ManualCommands.Ts Methods showsPrec :: Int -> TsLabelSelection -> ShowS # show :: TsLabelSelection -> String # showList :: [TsLabelSelection] -> ShowS # | |
| Eq TsLabelSelection Source # | |
Defined in Database.Redis.ManualCommands.Ts Methods (==) :: TsLabelSelection -> TsLabelSelection -> Bool # (/=) :: TsLabelSelection -> TsLabelSelection -> Bool # | |
data TsGroupByReduce Source #
Constructors
| TsGroupByReduce | |
Fields | |
Instances
| Show TsGroupByReduce Source # | |
Defined in Database.Redis.ManualCommands.Ts Methods showsPrec :: Int -> TsGroupByReduce -> ShowS # show :: TsGroupByReduce -> String # showList :: [TsGroupByReduce] -> ShowS # | |
| Eq TsGroupByReduce Source # | |
Defined in Database.Redis.ManualCommands.Ts Methods (==) :: TsGroupByReduce -> TsGroupByReduce -> Bool # (/=) :: TsGroupByReduce -> TsGroupByReduce -> Bool # | |
data TsMGetOpts Source #
Constructors
| TsMGetOpts | |
Fields | |
Instances
| Show TsMGetOpts Source # | |
Defined in Database.Redis.ManualCommands.Ts Methods showsPrec :: Int -> TsMGetOpts -> ShowS # show :: TsMGetOpts -> String # showList :: [TsMGetOpts] -> ShowS # | |
| Eq TsMGetOpts Source # | |
Defined in Database.Redis.ManualCommands.Ts | |
data TsMRangeOpts Source #
Constructors
| TsMRangeOpts | |
Instances
| Show TsMRangeOpts Source # | |
Defined in Database.Redis.ManualCommands.Ts Methods showsPrec :: Int -> TsMRangeOpts -> ShowS # show :: TsMRangeOpts -> String # showList :: [TsMRangeOpts] -> ShowS # | |
| Eq TsMRangeOpts Source # | |
Defined in Database.Redis.ManualCommands.Ts | |
data TsInfoOpts Source #
Constructors
| TsInfoDefault | |
| TsInfoDebug |
Instances
| Show TsInfoOpts Source # | |
Defined in Database.Redis.ManualCommands.Ts Methods showsPrec :: Int -> TsInfoOpts -> ShowS # show :: TsInfoOpts -> String # showList :: [TsInfoOpts] -> ShowS # | |
| Eq TsInfoOpts Source # | |
Defined in Database.Redis.ManualCommands.Ts | |
tsLabelsToArgs :: [(ByteString, ByteString)] -> [ByteString] Source #
tsIgnoreToArgs :: TsIgnore -> [ByteString] Source #
tsCreateOptsToArgs :: TsCreateOpts -> [ByteString] Source #
tsAlterOptsToArgs :: TsAlterOpts -> [ByteString] Source #
tsAddOptsToArgs :: TsAddOpts -> [ByteString] Source #
tsIncrByOptsToArgs :: TsIncrByOpts -> [ByteString] Source #
tsRangeOptsToArgs :: TsRangeOpts -> [ByteString] Source #
tsMGetOptsToArgs :: TsMGetOpts -> [ByteString] Source #
tsMRangeOptsToArgs :: TsMRangeOpts -> [ByteString] Source #
Arguments
| :: RedisCtx m f | |
| => ByteString | Time series key. |
| -> ByteString | Timestamp, or |
| -> Double | Sample value. |
| -> m (f Integer) |
Appends a sample to a time series (https://redis.io/commands/ts.add).
O(M) when M is the number of compaction rules, or O(1) with no compaction
Since RedisTimeSeries 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Time series key. |
| -> ByteString | Timestamp, or |
| -> Double | Sample value. |
| -> TsAddOpts | Insertion options. |
| -> m (f Integer) |
Appends a sample to a time series (https://redis.io/commands/ts.add).
O(M) when M is the number of compaction rules, or O(1) with no compaction
Since RedisTimeSeries 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Time series key. |
| -> TsAlterOpts | Alteration options. |
| -> m (f Status) |
Update the retention, chunk size, duplicate policy, and labels of an existing time series (https://redis.io/commands/ts.alter).
O(N) where N is the number of labels requested to update
Since RedisTimeSeries 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Time series key. |
| -> m (f Status) |
Arguments
| :: RedisCtx m f | |
| => ByteString | Time series key. |
| -> TsCreateOpts | Creation options. |
| -> m (f Status) |
Arguments
| :: RedisCtx m f | |
| => ByteString | Source time series key. |
| -> ByteString | Destination time series key. |
| -> TsAggregator | Aggregation function. |
| -> Integer | Bucket duration in milliseconds. |
| -> m (f Status) |
Arguments
| :: RedisCtx m f | |
| => ByteString | Source time series key. |
| -> ByteString | Destination time series key. |
| -> TsAggregator | Aggregation function. |
| -> Integer | Bucket duration in milliseconds. |
| -> Integer | Alignment timestamp in milliseconds. |
| -> m (f Status) |
Create a compaction rule with an aligned bucket timestamp (https://redis.io/commands/ts.createrule).
O(1)
Since RedisTimeSeries 1.8.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Time series key. |
| -> Double | Decrement amount. |
| -> m (f Integer) |
Decrease the value of the sample with the maximum timestamp, or create a new sample with a decremented value (https://redis.io/commands/ts.decrby).
O(M) when M is the number of compaction rules, or O(1) with no compaction
Since RedisTimeSeries 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Time series key. |
| -> Double | Decrement amount. |
| -> TsIncrByOpts | Update options. |
| -> m (f Integer) |
Decrease the value of the sample with the maximum timestamp, or create a new sample with a decremented value (https://redis.io/commands/ts.decrby).
O(M) when M is the number of compaction rules, or O(1) with no compaction
Since RedisTimeSeries 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Time series key. |
| -> Integer | Lower timestamp bound. |
| -> Integer | Upper timestamp bound. |
| -> m (f Integer) |
Delete all samples between two timestamps for a given time series (https://redis.io/commands/ts.del).
O(N) where N is the number of data points that will be removed
Since RedisTimeSeries 1.6.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Source time series key. |
| -> ByteString | Destination time series key. |
| -> m (f Status) |
Arguments
| :: RedisCtx m f | |
| => ByteString | Time series key. |
| -> m (f (Maybe TsSample)) |
Get the sample with the highest timestamp from a given time series (https://redis.io/commands/ts.get).
O(1)
Since RedisTimeSeries 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Time series key. |
| -> TsGetOpts | Read options. |
| -> m (f (Maybe TsSample)) |
Get the sample with the highest timestamp from a given time series (https://redis.io/commands/ts.get).
O(1)
Since RedisTimeSeries 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Time series key. |
| -> Double | Increment amount. |
| -> m (f Integer) |
Increase the value of the sample with the maximum timestamp, or create a new sample with an incremented value (https://redis.io/commands/ts.incrby).
O(M) when M is the number of compaction rules, or O(1) with no compaction
Since RedisTimeSeries 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Time series key. |
| -> Double | Increment amount. |
| -> TsIncrByOpts | Update options. |
| -> m (f Integer) |
Increase the value of the sample with the maximum timestamp, or create a new sample with an incremented value (https://redis.io/commands/ts.incrby).
O(M) when M is the number of compaction rules, or O(1) with no compaction
Since RedisTimeSeries 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Time series key. |
| -> m (f Reply) |
Returns information and statistics for a time series (https://redis.io/commands/ts.info).
The reply is a heterogeneous attribute map, so this wrapper returns the raw Reply.
O(1)
Since RedisTimeSeries 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Time series key. |
| -> TsInfoOpts | Information query options. |
| -> m (f Reply) |
Returns information and statistics for a time series (https://redis.io/commands/ts.info).
The reply is a heterogeneous attribute map, so this wrapper returns the raw Reply.
O(1)
Since RedisTimeSeries 1.0.0
Arguments
| :: RedisCtx m f | |
| => NonEmpty (ByteString, ByteString, Double) | Time series key, timestamp, and sample value triplets. |
| -> m (f [Integer]) |
Append new samples to one or more time series (https://redis.io/commands/ts.madd).
O(N cdot M) when N is the number of series updated and M is the number of compaction rules, or O(N) with no compaction
Since RedisTimeSeries 1.0.0
Arguments
| :: RedisCtx m f | |
| => NonEmpty ByteString | Filter expressions. |
| -> m (f Reply) |
Get the sample with the highest timestamp from each time series matching a specific filter (https://redis.io/commands/ts.mget).
The reply is heterogeneous and depends on label options, so this wrapper returns the raw Reply.
O(n) where n is the number of time-series that match the filters
Since RedisTimeSeries 1.0.0
Arguments
| :: RedisCtx m f | |
| => NonEmpty ByteString | Filter expressions. |
| -> TsMGetOpts | Read options. |
| -> m (f Reply) |
Get the sample with the highest timestamp from each time series matching a specific filter (https://redis.io/commands/ts.mget).
The reply is heterogeneous and depends on label options, so this wrapper returns the raw Reply.
O(n) where n is the number of time-series that match the filters
Since RedisTimeSeries 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Lower timestamp bound, or |
| -> ByteString | Upper timestamp bound, or |
| -> NonEmpty ByteString | Filter expressions. |
| -> m (f Reply) |
Query a range across multiple time series by filters in forward direction (https://redis.io/commands/ts.mrange).
The reply is heterogeneous and may include labels or grouped output, so this wrapper returns the raw Reply.
O(n/m+k) where n is the number of data points, m is the chunk size, and k is the number of returned samples
Since RedisTimeSeries 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Lower timestamp bound, or |
| -> ByteString | Upper timestamp bound, or |
| -> NonEmpty ByteString | Filter expressions. |
| -> TsMRangeOpts | Query options. |
| -> m (f Reply) |
Query a range across multiple time series by filters in forward direction (https://redis.io/commands/ts.mrange).
The reply is heterogeneous and may include labels or grouped output, so this wrapper returns the raw Reply.
O(n/m+k) where n is the number of data points, m is the chunk size, and k is the number of returned samples
Since RedisTimeSeries 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Lower timestamp bound, or |
| -> ByteString | Upper timestamp bound, or |
| -> NonEmpty ByteString | Filter expressions. |
| -> m (f Reply) |
Query a range across multiple time series by filters in reverse direction (https://redis.io/commands/ts.mrevrange).
The reply is heterogeneous and may include labels or grouped output, so this wrapper returns the raw Reply.
O(n/m+k) where n is the number of data points, m is the chunk size, and k is the number of returned samples
Since RedisTimeSeries 1.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Lower timestamp bound, or |
| -> ByteString | Upper timestamp bound, or |
| -> NonEmpty ByteString | Filter expressions. |
| -> TsMRangeOpts | Query options. |
| -> m (f Reply) |
Query a range across multiple time series by filters in reverse direction (https://redis.io/commands/ts.mrevrange).
The reply is heterogeneous and may include labels or grouped output, so this wrapper returns the raw Reply.
O(n/m+k) where n is the number of data points, m is the chunk size, and k is the number of returned samples
Since RedisTimeSeries 1.4.0
Arguments
| :: RedisCtx m f | |
| => NonEmpty ByteString | Filter expressions. |
| -> m (f [ByteString]) |
Get all time series keys matching a filter list (https://redis.io/commands/ts.queryindex).
O(n) where n is the number of time-series that match the filters
Since RedisTimeSeries 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Time series key. |
| -> ByteString | Lower timestamp bound, or |
| -> ByteString | Upper timestamp bound, or |
| -> m (f [TsSample]) |
Query a range in forward direction (https://redis.io/commands/ts.range).
O(n/m+k) where n is the number of data points, m is the chunk size, and k is the number of returned samples
Since RedisTimeSeries 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Time series key. |
| -> ByteString | Lower timestamp bound, or |
| -> ByteString | Upper timestamp bound, or |
| -> TsRangeOpts | Query options. |
| -> m (f [TsSample]) |
Query a range in forward direction (https://redis.io/commands/ts.range).
O(n/m+k) where n is the number of data points, m is the chunk size, and k is the number of returned samples
Since RedisTimeSeries 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Time series key. |
| -> ByteString | Lower timestamp bound, or |
| -> ByteString | Upper timestamp bound, or |
| -> m (f [TsSample]) |
Query a range in reverse direction (https://redis.io/commands/ts.revrange).
O(n/m+k) where n is the number of data points, m is the chunk size, and k is the number of returned samples
Since RedisTimeSeries 1.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Time series key. |
| -> ByteString | Lower timestamp bound, or |
| -> ByteString | Upper timestamp bound, or |
| -> TsRangeOpts | Query options. |
| -> m (f [TsSample]) |
Query a range in reverse direction (https://redis.io/commands/ts.revrange).
O(n/m+k) where n is the number of data points, m is the chunk size, and k is the number of returned samples
Since RedisTimeSeries 1.4.0
Constructors
| TopkInfo | |
Fields
| |
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Top-K sketch. |
| -> NonEmpty ByteString | Items to add. |
| -> m (f [Maybe ByteString]) |
Adds one or more items to a Top-K sketch (https://redis.io/commands/topk.add).
Returns the items dropped from the sketch after each insertion, or Nothing when no item was expelled.
O(n cdot d), where n is the number of items and d is the depth of the sketch.
Since RedisBloom 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Top-K sketch. |
| -> NonEmpty ByteString | Items to count. |
| -> m (f [Integer]) |
Returns the count for one or more items in a Top-K sketch (https://redis.io/commands/topk.count).
Returns 0 for items that are not tracked by the sketch.
O(n cdot d), where n is the number of items and d is the depth of the sketch.
Since RedisBloom 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Top-K sketch. |
| -> NonEmpty (ByteString, Integer) | Item and increment pairs. |
| -> m (f [Maybe ByteString]) |
Increments the count of one or more items by a configured amount (https://redis.io/commands/topk.incrby).
Returns the items dropped from the sketch after each increment, or Nothing when no item was expelled.
O(n cdot d), where n is the number of item-increment pairs and d is the depth of the sketch.
Since RedisBloom 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Top-K sketch. |
| -> m (f [ByteString]) |
Returns the items in a Top-K sketch (https://redis.io/commands/topk.list).
O(k), where k is the configured top-k size.
Since RedisBloom 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Top-K sketch. |
| -> m (f [(ByteString, Integer)]) |
Returns the items in a Top-K sketch along with their approximated counts (https://redis.io/commands/topk.list).
O(k), where k is the configured top-k size.
Since RedisBloom 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Top-K sketch to create. |
| -> Integer | Number of items to keep in the sketch. |
| -> Integer | Number of counters in each array. |
| -> Integer | Number of counter arrays. |
| -> Double | Decay factor. |
| -> m (f Status) |
Creates an empty Top-K sketch (https://redis.io/commands/topk.reserve).
The sketch will fail to be created if the key already exists.
O(1)
Since RedisBloom 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Top-K sketch. |
| -> NonEmpty ByteString | Items to check. |
| -> m (f [Bool]) |
Checks whether one or more items are present in a Top-K sketch (https://redis.io/commands/topk.query).
A False value means the item is not currently one of the tracked heavy hitters.
O(n cdot d), where n is the number of items and d is the depth of the sketch.
Since RedisBloom 2.0.0
data TDigestCreateOpts Source #
Constructors
| TDigestCreateOpts | |
Fields
| |
Instances
| Show TDigestCreateOpts Source # | |
Defined in Database.Redis.ManualCommands.Tdigest Methods showsPrec :: Int -> TDigestCreateOpts -> ShowS # show :: TDigestCreateOpts -> String # showList :: [TDigestCreateOpts] -> ShowS # | |
| Eq TDigestCreateOpts Source # | |
Defined in Database.Redis.ManualCommands.Tdigest Methods (==) :: TDigestCreateOpts -> TDigestCreateOpts -> Bool # (/=) :: TDigestCreateOpts -> TDigestCreateOpts -> Bool # | |
data TDigestMergeOpts Source #
Constructors
| TDigestMergeOpts | |
Fields
| |
Instances
| Show TDigestMergeOpts Source # | |
Defined in Database.Redis.ManualCommands.Tdigest Methods showsPrec :: Int -> TDigestMergeOpts -> ShowS # show :: TDigestMergeOpts -> String # showList :: [TDigestMergeOpts] -> ShowS # | |
| Eq TDigestMergeOpts Source # | |
Defined in Database.Redis.ManualCommands.Tdigest Methods (==) :: TDigestMergeOpts -> TDigestMergeOpts -> Bool # (/=) :: TDigestMergeOpts -> TDigestMergeOpts -> Bool # | |
data TDigestInfo Source #
Constructors
| TDigestInfo | |
Fields
| |
Instances
| Show TDigestInfo Source # | |
Defined in Database.Redis.ManualCommands.Tdigest Methods showsPrec :: Int -> TDigestInfo -> ShowS # show :: TDigestInfo -> String # showList :: [TDigestInfo] -> ShowS # | |
| Eq TDigestInfo Source # | |
Defined in Database.Redis.ManualCommands.Tdigest | |
| RedisResult TDigestInfo Source # | |
Defined in Database.Redis.ManualCommands.Tdigest | |
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the t-digest sketch. |
| -> NonEmpty Double | Observations to add. |
| -> m (f Status) |
Adds one or more observations to a t-digest sketch (https://redis.io/commands/tdigest.add).
O(n log k), where n is the number of observations and k is the compression parameter.
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the t-digest sketch. |
| -> NonEmpty Integer | Requested ranks. |
| -> m (f [Double]) |
Returns observations by their ascending ranks from a t-digest sketch (https://redis.io/commands/tdigest.byrank).
O(n log k), where n is the number of requested ranks and k is the compression parameter.
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the t-digest sketch. |
| -> NonEmpty Integer | Requested reverse ranks. |
| -> m (f [Double]) |
Returns observations by their descending ranks from a t-digest sketch (https://redis.io/commands/tdigest.byrevrank).
O(n log k), where n is the number of requested reverse ranks and k is the compression parameter.
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the t-digest sketch. |
| -> NonEmpty Double | Observations to query. |
| -> m (f [Double]) |
Returns cumulative distribution estimates for one or more observations (https://redis.io/commands/tdigest.cdf).
O(n log k), where n is the number of queried values and k is the compression parameter.
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the t-digest sketch to create. |
| -> m (f Status) |
Creates an empty t-digest sketch (https://redis.io/commands/tdigest.create).
O(1)
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the t-digest sketch to create. |
| -> TDigestCreateOpts | Creation options. |
| -> m (f Status) |
Creates an empty t-digest sketch (https://redis.io/commands/tdigest.create).
O(1)
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the t-digest sketch. |
| -> m (f TDigestInfo) |
Returns information about a t-digest sketch (https://redis.io/commands/tdigest.info).
O(1)
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the t-digest sketch. |
| -> m (f Double) |
Returns the maximum observation in a t-digest sketch (https://redis.io/commands/tdigest.max).
O(1)
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Destination key. |
| -> NonEmpty ByteString | Source sketch keys. |
| -> m (f Status) |
Merges multiple t-digest sketches into a destination sketch (https://redis.io/commands/tdigest.merge).
O(n cdot k), where n is the number of source sketches and k is the compression parameter.
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Destination key. |
| -> NonEmpty ByteString | Source sketch keys. |
| -> TDigestMergeOpts | Merge options. |
| -> m (f Status) |
Merges multiple t-digest sketches into a destination sketch (https://redis.io/commands/tdigest.merge).
O(n cdot k), where n is the number of source sketches and k is the compression parameter.
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the t-digest sketch. |
| -> m (f Double) |
Returns the minimum observation in a t-digest sketch (https://redis.io/commands/tdigest.min).
O(1)
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the t-digest sketch. |
| -> NonEmpty Double | Quantiles to estimate. |
| -> m (f [Double]) |
Returns quantile estimates for one or more quantiles (https://redis.io/commands/tdigest.quantile).
O(n log k), where n is the number of quantiles and k is the compression parameter.
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the t-digest sketch. |
| -> NonEmpty Double | Observations to rank. |
| -> m (f [Integer]) |
Returns ascending rank estimates for one or more observations (https://redis.io/commands/tdigest.rank).
O(n log k), where n is the number of observations and k is the compression parameter.
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the t-digest sketch. |
| -> m (f Status) |
Resets a t-digest sketch to its empty state (https://redis.io/commands/tdigest.reset).
O(1)
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the t-digest sketch. |
| -> NonEmpty Double | Observations to rank. |
| -> m (f [Integer]) |
Returns descending rank estimates for one or more observations (https://redis.io/commands/tdigest.revrank).
O(n log k), where n is the number of observations and k is the compression parameter.
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the t-digest sketch. |
| -> Double | Lower quantile bound. |
| -> Double | Upper quantile bound. |
| -> m (f Double) |
Returns the trimmed mean for observations within the provided quantile range (https://redis.io/commands/tdigest.trimmed_mean).
O(log k), where k is the compression parameter.
Since RedisBloom 2.4.0
data JSONGetOpts Source #
Constructors
| JSONGetOpts | |
Fields | |
Instances
| Show JSONGetOpts Source # | |
Defined in Database.Redis.ManualCommands.JSON Methods showsPrec :: Int -> JSONGetOpts -> ShowS # show :: JSONGetOpts -> String # showList :: [JSONGetOpts] -> ShowS # | |
| Eq JSONGetOpts Source # | |
Defined in Database.Redis.ManualCommands.JSON | |
data JSONSetCondition Source #
Constructors
| JSONSetIfNotExists | |
| JSONSetIfExists |
Instances
| Show JSONSetCondition Source # | |
Defined in Database.Redis.ManualCommands.JSON Methods showsPrec :: Int -> JSONSetCondition -> ShowS # show :: JSONSetCondition -> String # showList :: [JSONSetCondition] -> ShowS # | |
| Eq JSONSetCondition Source # | |
Defined in Database.Redis.ManualCommands.JSON Methods (==) :: JSONSetCondition -> JSONSetCondition -> Bool # (/=) :: JSONSetCondition -> JSONSetCondition -> Bool # | |
| RedisArg JSONSetCondition Source # | |
Defined in Database.Redis.ManualCommands.JSON Methods encode :: JSONSetCondition -> ByteString Source # | |
data JSONSetFPHA Source #
Constructors
| JSONSetFP16 | |
| JSONSetBF16 | |
| JSONSetFP32 | |
| JSONSetFP64 |
Instances
| Show JSONSetFPHA Source # | |
Defined in Database.Redis.ManualCommands.JSON Methods showsPrec :: Int -> JSONSetFPHA -> ShowS # show :: JSONSetFPHA -> String # showList :: [JSONSetFPHA] -> ShowS # | |
| Eq JSONSetFPHA Source # | |
Defined in Database.Redis.ManualCommands.JSON | |
| RedisArg JSONSetFPHA Source # | |
Defined in Database.Redis.ManualCommands.JSON Methods encode :: JSONSetFPHA -> ByteString Source # | |
data JSONSetOpts Source #
Constructors
| JSONSetOpts | |
Fields | |
Instances
| Show JSONSetOpts Source # | |
Defined in Database.Redis.ManualCommands.JSON Methods showsPrec :: Int -> JSONSetOpts -> ShowS # show :: JSONSetOpts -> String # showList :: [JSONSetOpts] -> ShowS # | |
| Eq JSONSetOpts Source # | |
Defined in Database.Redis.ManualCommands.JSON | |
data JSONArrIndexOpts Source #
Instances
| Show JSONArrIndexOpts Source # | |
Defined in Database.Redis.ManualCommands.JSON Methods showsPrec :: Int -> JSONArrIndexOpts -> ShowS # show :: JSONArrIndexOpts -> String # showList :: [JSONArrIndexOpts] -> ShowS # | |
| Eq JSONArrIndexOpts Source # | |
Defined in Database.Redis.ManualCommands.JSON Methods (==) :: JSONArrIndexOpts -> JSONArrIndexOpts -> Bool # (/=) :: JSONArrIndexOpts -> JSONArrIndexOpts -> Bool # | |
jsonGetOptsToArgs :: JSONGetOpts -> [ByteString] Source #
jsonSetOptsToArgs :: JSONSetOpts -> [ByteString] Source #
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> ByteString | Path to the array. |
| -> NonEmpty ByteString | Serialized JSON values to append. |
| -> m (f Reply) |
Appends one or more JSON values into the array at path after the last element in it (https://redis.io/commands/json.arrappend).
The reply shape depends on the path syntax, so this wrapper returns the raw Reply.
O(1) when path is evaluated to a single value, O(N) when path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> ByteString | Path to the array. |
| -> ByteString | Serialized JSON scalar to search for. |
| -> m (f Reply) |
Returns the index of the first occurrence of a JSON scalar value in the array at path (https://redis.io/commands/json.arrindex).
The reply shape depends on the path syntax, so this wrapper returns the raw Reply.
O(N) when path is evaluated to a single value where N is the size of the array, O(N) when path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> ByteString | Path to the array. |
| -> ByteString | Serialized JSON scalar to search for. |
| -> JSONArrIndexOpts | Optional search range. |
| -> m (f Reply) |
Returns the index of the first occurrence of a JSON scalar value in the array at path (https://redis.io/commands/json.arrindex).
The reply shape depends on the path syntax, so this wrapper returns the raw Reply.
O(N) when path is evaluated to a single value where N is the size of the array, O(N) when path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> m (f Reply) |
Returns the length of the array at the root path (https://redis.io/commands/json.arrlen).
O(1) where path is evaluated to a single value, O(N) where path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> ByteString | Path to the array. |
| -> m (f Reply) |
Returns the length of the array at path (https://redis.io/commands/json.arrlen).
The reply shape depends on the path syntax, so this wrapper returns the raw Reply.
O(1) where path is evaluated to a single value, O(N) where path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> ByteString | Path to the array. |
| -> Integer | Insertion index. |
| -> NonEmpty ByteString | Serialized JSON values to insert. |
| -> m (f Reply) |
Inserts the JSON scalar(s) value at the specified index in the array at path (https://redis.io/commands/json.arrinsert).
The reply shape depends on the path syntax, so this wrapper returns the raw Reply.
O(N) when path is evaluated to a single value where N is the size of the array, O(N) when path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> m (f Reply) |
Removes and returns the element at the end of the array at the root path (https://redis.io/commands/json.arrpop).
O(1) when the popped item is the last element, otherwise O(N) where N is the size of the array
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> ByteString | Path to the array. |
| -> m (f Reply) |
Removes and returns the element at the end of the array at path (https://redis.io/commands/json.arrpop).
The reply shape depends on the path syntax and popped value type, so this wrapper returns the raw Reply.
O(1) when the popped item is the last element, otherwise O(N) where N is the size of the array
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> ByteString | Path to the array. |
| -> Integer | Index to pop. |
| -> m (f Reply) |
Removes and returns the element at the specified index in the array at path (https://redis.io/commands/json.arrpop).
The reply shape depends on the path syntax and popped value type, so this wrapper returns the raw Reply.
O(N) when the specified index is not the last element, otherwise O(1)
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> ByteString | Path to the array. |
| -> Integer | Start index. |
| -> Integer | Stop index. |
| -> m (f Reply) |
Trims the array at path to contain only the specified inclusive range of indices from start to stop (https://redis.io/commands/json.arrtrim).
The reply shape depends on the path syntax, so this wrapper returns the raw Reply.
O(N) when path is evaluated to a single value where N is the size of the array, O(N) when path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> m (f Integer) |
Clears all values from an array or an object and sets numeric values at the root path to 0 (https://redis.io/commands/json.clear).
O(N) when path is evaluated to a single value where N is the size of the values, O(N) when path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> ByteString | Path to clear. |
| -> m (f Integer) |
Clears all values from an array or an object and sets numeric values at path to 0 (https://redis.io/commands/json.clear).
O(N) when path is evaluated to a single value where N is the size of the values, O(N) when path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 2.0.0
jsonDebug :: RedisCtx m f => m (f Reply) Source #
Executes the JSON debug container command (https://redis.io/commands/json.debug).
This is a container command for debugging related tasks.
N/A
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> m (f Reply) |
Reports the size in bytes of a key at the root path (https://redis.io/commands/json.debug-memory).
The reply shape depends on the path syntax, so this wrapper returns the raw Reply.
O(N) when path is evaluated to a single value, where N is the size of the value, O(N) when path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> ByteString | Path to inspect. |
| -> m (f Reply) |
Reports the size in bytes of a key at path (https://redis.io/commands/json.debug-memory).
The reply shape depends on the path syntax, so this wrapper returns the raw Reply.
O(N) when path is evaluated to a single value, where N is the size of the value, O(N) when path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> m (f Integer) |
Deletes a value at the root path (https://redis.io/commands/json.del).
O(N) when path is evaluated to a single value where N is the size of the deleted value, O(N) when path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> ByteString | Path to delete. |
| -> m (f Integer) |
Deletes a value at path (https://redis.io/commands/json.del).
O(N) when path is evaluated to a single value where N is the size of the deleted value, O(N) when path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> m (f Integer) |
Deletes a value at the root path (https://redis.io/commands/json.forget).
O(N) when path is evaluated to a single value where N is the size of the deleted value, O(N) when path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> ByteString | Path to delete. |
| -> m (f Integer) |
Deletes a value at path (https://redis.io/commands/json.forget).
O(N) when path is evaluated to a single value where N is the size of the deleted value, O(N) when path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> m (f (Maybe ByteString)) |
Gets the value at the root path in JSON serialized form (https://redis.io/commands/json.get).
O(N) when path is evaluated to a single value where N is the size of the value, O(N) when path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> JSONGetOpts | Formatting and path selection options. |
| -> m (f (Maybe ByteString)) |
Gets the value at one or more paths in JSON serialized form (https://redis.io/commands/json.get).
O(N) when path is evaluated to a single value where N is the size of the value, O(N) when path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> ByteString | Path to merge into. |
| -> ByteString | Serialized JSON value. |
| -> m (f Status) |
Merges a given JSON value into matching paths (https://redis.io/commands/json.merge).
Consequently, JSON values at matching paths are updated, deleted, or expanded with new children.
O(M+N) when path is evaluated to a single value where M is the size of the original value and N is the size of the new value, O(M+N) when path is evaluated to multiple values where M is the size of the key and N is the size of the new value times the number of matches
Since RedisJSON 2.6.0
Arguments
| :: RedisCtx m f | |
| => NonEmpty ByteString | Keys holding JSON values. |
| -> ByteString | Path to fetch from each key. |
| -> m (f [Maybe ByteString]) |
Returns the values at a path from one or more keys (https://redis.io/commands/json.mget).
O(M*N) when path is evaluated to a single value where M is the number of keys and N is the size of the value, O(N1+N2+dots+Nm) when path is evaluated to multiple values
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => NonEmpty (ByteString, ByteString, ByteString) | Key, path, serialized JSON value triplets. |
| -> m (f Status) |
Sets or updates the JSON value of one or more keys (https://redis.io/commands/json.mset).
O(K*(M+N)) where K is the number of keys in the command
Since RedisJSON 2.6.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> ByteString | Path to the numeric value. |
| -> Double | Increment value. |
| -> m (f Reply) |
Increments the numeric value at path by a value (https://redis.io/commands/json.numincrby).
The reply shape depends on the path syntax, so this wrapper returns the raw Reply.
O(1) when path is evaluated to a single value, O(N) when path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> ByteString | Path to the numeric value. |
| -> Double | Multiplier value. |
| -> m (f Reply) |
Multiplies the numeric value at path by a value (https://redis.io/commands/json.nummultby).
The reply shape depends on the path syntax, so this wrapper returns the raw Reply.
O(1) when path is evaluated to a single value, O(N) when path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> m (f Reply) |
Returns the key names of JSON objects at the root path (https://redis.io/commands/json.objkeys).
The reply shape depends on the path syntax, so this wrapper returns the raw Reply.
O(N) when path is evaluated to a single value, where N is the number of keys in the object, O(N) when path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> ByteString | Path to the object. |
| -> m (f Reply) |
Returns the key names of JSON objects at path (https://redis.io/commands/json.objkeys).
The reply shape depends on the path syntax, so this wrapper returns the raw Reply.
O(N) when path is evaluated to a single value, where N is the number of keys in the object, O(N) when path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> m (f Reply) |
Returns the number of keys in JSON objects at the root path (https://redis.io/commands/json.objlen).
The reply shape depends on the path syntax, so this wrapper returns the raw Reply.
O(1) when path is evaluated to a single value, O(N) when path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> ByteString | Path to the object. |
| -> m (f Reply) |
Returns the number of keys in JSON objects at path (https://redis.io/commands/json.objlen).
The reply shape depends on the path syntax, so this wrapper returns the raw Reply.
O(1) when path is evaluated to a single value, O(N) when path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> m (f Reply) |
Returns the JSON value at the root path in Redis Serialization Protocol (RESP) (https://redis.io/commands/json.resp).
The reply may be any RESP shape depending on the JSON value, so this wrapper returns the raw Reply.
O(N) when path is evaluated to a single value, where N is the size of the value, O(N) when path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> ByteString | Path to inspect. |
| -> m (f Reply) |
Returns the JSON value at path in Redis Serialization Protocol (RESP) (https://redis.io/commands/json.resp).
The reply may be any RESP shape depending on the JSON value, so this wrapper returns the raw Reply.
O(N) when path is evaluated to a single value, where N is the size of the value, O(N) when path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> ByteString | Path to set. |
| -> ByteString | Serialized JSON value. |
| -> m (f (Maybe Status)) |
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> ByteString | Path to set. |
| -> ByteString | Serialized JSON value. |
| -> JSONSetOpts | Conditional and FPHA options. |
| -> m (f (Maybe Status)) |
Sets or updates the JSON value at a path (https://redis.io/commands/json.set).
O(M+N) when path is evaluated to a single value where M is the size of the original value and N is the size of the new value, O(M+N) when path is evaluated to multiple values where M is the size of the key and N is the size of the new value times the number of matches
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> ByteString | String value to append. |
| -> m (f Reply) |
Appends a string to JSON strings at the root path (https://redis.io/commands/json.strappend).
The reply shape depends on the path syntax, so this wrapper returns the raw Reply.
O(1) when path is evaluated to a single value, O(N) when path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> ByteString | Path to the JSON string. |
| -> ByteString | String value to append. |
| -> m (f Reply) |
Appends a string to JSON strings at path (https://redis.io/commands/json.strappend).
The reply shape depends on the path syntax, so this wrapper returns the raw Reply.
O(1) when path is evaluated to a single value, O(N) when path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> ByteString | Path to the boolean value. |
| -> m (f Reply) |
Toggles a boolean value (https://redis.io/commands/json.toggle).
The reply shape depends on the path syntax, so this wrapper returns the raw Reply.
O(1) when path is evaluated to a single value, O(N) when path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> m (f Reply) |
Returns the type of the JSON value at the root path (https://redis.io/commands/json.type).
The reply shape depends on the path syntax, so this wrapper returns the raw Reply.
O(1) when path is evaluated to a single value, O(N) when path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key holding a JSON value. |
| -> ByteString | Path to inspect. |
| -> m (f Reply) |
Returns the type of the JSON value at path (https://redis.io/commands/json.type).
The reply shape depends on the path syntax, so this wrapper returns the raw Reply.
O(1) when path is evaluated to a single value, O(N) when path is evaluated to multiple values, where N is the size of the key
Since RedisJSON 1.0.0
countArgs :: [a] -> ByteString Source #
data FTIndexAllMode Source #
Constructors
| FTIndexAllEnable | |
| FTIndexAllDisable |
Instances
| Show FTIndexAllMode Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTIndexAllMode -> ShowS # show :: FTIndexAllMode -> String # showList :: [FTIndexAllMode] -> ShowS # | |
| Eq FTIndexAllMode Source # | |
Defined in Database.Redis.ManualCommands.FT Methods (==) :: FTIndexAllMode -> FTIndexAllMode -> Bool # (/=) :: FTIndexAllMode -> FTIndexAllMode -> Bool # | |
| RedisArg FTIndexAllMode Source # | |
Defined in Database.Redis.ManualCommands.FT Methods encode :: FTIndexAllMode -> ByteString Source # | |
data FTFieldIdentifier Source #
Constructors
| FTFieldName ByteString | |
| FTFieldNameAs ByteString ByteString |
Instances
| Show FTFieldIdentifier Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTFieldIdentifier -> ShowS # show :: FTFieldIdentifier -> String # showList :: [FTFieldIdentifier] -> ShowS # | |
| Eq FTFieldIdentifier Source # | |
Defined in Database.Redis.ManualCommands.FT Methods (==) :: FTFieldIdentifier -> FTFieldIdentifier -> Bool # (/=) :: FTFieldIdentifier -> FTFieldIdentifier -> Bool # | |
data FTSortable Source #
Constructors
| FTSortable | |
| FTSortableUnf |
Instances
| Show FTSortable Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTSortable -> ShowS # show :: FTSortable -> String # showList :: [FTSortable] -> ShowS # | |
| Eq FTSortable Source # | |
Defined in Database.Redis.ManualCommands.FT | |
data FTCommonFieldOpts Source #
Constructors
| FTCommonFieldOpts | |
Instances
| Show FTCommonFieldOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTCommonFieldOpts -> ShowS # show :: FTCommonFieldOpts -> String # showList :: [FTCommonFieldOpts] -> ShowS # | |
| Eq FTCommonFieldOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods (==) :: FTCommonFieldOpts -> FTCommonFieldOpts -> Bool # (/=) :: FTCommonFieldOpts -> FTCommonFieldOpts -> Bool # | |
data FTTextFieldOpts Source #
Constructors
| FTTextFieldOpts | |
Instances
| Show FTTextFieldOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTTextFieldOpts -> ShowS # show :: FTTextFieldOpts -> String # showList :: [FTTextFieldOpts] -> ShowS # | |
| Eq FTTextFieldOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods (==) :: FTTextFieldOpts -> FTTextFieldOpts -> Bool # (/=) :: FTTextFieldOpts -> FTTextFieldOpts -> Bool # | |
data FTTagFieldOpts Source #
Constructors
| FTTagFieldOpts | |
Instances
| Show FTTagFieldOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTTagFieldOpts -> ShowS # show :: FTTagFieldOpts -> String # showList :: [FTTagFieldOpts] -> ShowS # | |
| Eq FTTagFieldOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods (==) :: FTTagFieldOpts -> FTTagFieldOpts -> Bool # (/=) :: FTTagFieldOpts -> FTTagFieldOpts -> Bool # | |
data FTGeoShapeFieldOpts Source #
Constructors
| FTGeoShapeFieldOpts | |
Instances
| Show FTGeoShapeFieldOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTGeoShapeFieldOpts -> ShowS # show :: FTGeoShapeFieldOpts -> String # showList :: [FTGeoShapeFieldOpts] -> ShowS # | |
| Eq FTGeoShapeFieldOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods (==) :: FTGeoShapeFieldOpts -> FTGeoShapeFieldOpts -> Bool # (/=) :: FTGeoShapeFieldOpts -> FTGeoShapeFieldOpts -> Bool # | |
data FTVectorFieldOpts Source #
Constructors
| FTVectorFieldOpts | |
Instances
| Show FTVectorFieldOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTVectorFieldOpts -> ShowS # show :: FTVectorFieldOpts -> String # showList :: [FTVectorFieldOpts] -> ShowS # | |
| Eq FTVectorFieldOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods (==) :: FTVectorFieldOpts -> FTVectorFieldOpts -> Bool # (/=) :: FTVectorFieldOpts -> FTVectorFieldOpts -> Bool # | |
data FTCreateField Source #
Constructors
| FTCreateTextField FTFieldIdentifier FTTextFieldOpts | |
| FTCreateTagField FTFieldIdentifier FTTagFieldOpts | |
| FTCreateNumericField FTFieldIdentifier FTCommonFieldOpts | |
| FTCreateGeoField FTFieldIdentifier FTCommonFieldOpts | |
| FTCreateGeoShapeField FTFieldIdentifier FTGeoShapeFieldOpts | |
| FTCreateVectorField FTFieldIdentifier FTVectorFieldOpts |
Instances
| Show FTCreateField Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTCreateField -> ShowS # show :: FTCreateField -> String # showList :: [FTCreateField] -> ShowS # | |
| Eq FTCreateField Source # | |
Defined in Database.Redis.ManualCommands.FT Methods (==) :: FTCreateField -> FTCreateField -> Bool # (/=) :: FTCreateField -> FTCreateField -> Bool # | |
data FTCreateOpts Source #
Constructors
| FTCreateOpts | |
Fields
| |
Instances
| Show FTCreateOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTCreateOpts -> ShowS # show :: FTCreateOpts -> String # showList :: [FTCreateOpts] -> ShowS # | |
| Eq FTCreateOpts Source # | |
Defined in Database.Redis.ManualCommands.FT | |
data FTAlterOpts Source #
Constructors
| FTAlterOpts | |
Fields | |
Instances
| Show FTAlterOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTAlterOpts -> ShowS # show :: FTAlterOpts -> String # showList :: [FTAlterOpts] -> ShowS # | |
| Eq FTAlterOpts Source # | |
Defined in Database.Redis.ManualCommands.FT | |
data FTExplainOpts Source #
Constructors
| FTExplainOpts | |
Fields | |
Instances
| Show FTExplainOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTExplainOpts -> ShowS # show :: FTExplainOpts -> String # showList :: [FTExplainOpts] -> ShowS # | |
| Eq FTExplainOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods (==) :: FTExplainOpts -> FTExplainOpts -> Bool # (/=) :: FTExplainOpts -> FTExplainOpts -> Bool # | |
data FTSearchContentMode Source #
Constructors
| FTSearchReturnDocuments | |
| FTSearchReturnIdsOnly |
Instances
| Show FTSearchContentMode Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTSearchContentMode -> ShowS # show :: FTSearchContentMode -> String # showList :: [FTSearchContentMode] -> ShowS # | |
| Eq FTSearchContentMode Source # | |
Defined in Database.Redis.ManualCommands.FT Methods (==) :: FTSearchContentMode -> FTSearchContentMode -> Bool # (/=) :: FTSearchContentMode -> FTSearchContentMode -> Bool # | |
data FTSearchScoreMode Source #
Instances
| Show FTSearchScoreMode Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTSearchScoreMode -> ShowS # show :: FTSearchScoreMode -> String # showList :: [FTSearchScoreMode] -> ShowS # | |
| Eq FTSearchScoreMode Source # | |
Defined in Database.Redis.ManualCommands.FT Methods (==) :: FTSearchScoreMode -> FTSearchScoreMode -> Bool # (/=) :: FTSearchScoreMode -> FTSearchScoreMode -> Bool # | |
data FTSearchPayloadMode Source #
Constructors
| FTSearchNoPayloads | |
| FTSearchWithPayloads |
Instances
| Show FTSearchPayloadMode Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTSearchPayloadMode -> ShowS # show :: FTSearchPayloadMode -> String # showList :: [FTSearchPayloadMode] -> ShowS # | |
| Eq FTSearchPayloadMode Source # | |
Defined in Database.Redis.ManualCommands.FT Methods (==) :: FTSearchPayloadMode -> FTSearchPayloadMode -> Bool # (/=) :: FTSearchPayloadMode -> FTSearchPayloadMode -> Bool # | |
data FTSearchSortKeysMode Source #
Constructors
| FTSearchNoSortKeys | |
| FTSearchWithSortKeys |
Instances
| Show FTSearchSortKeysMode Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTSearchSortKeysMode -> ShowS # show :: FTSearchSortKeysMode -> String # showList :: [FTSearchSortKeysMode] -> ShowS # | |
| Eq FTSearchSortKeysMode Source # | |
Defined in Database.Redis.ManualCommands.FT Methods (==) :: FTSearchSortKeysMode -> FTSearchSortKeysMode -> Bool # (/=) :: FTSearchSortKeysMode -> FTSearchSortKeysMode -> Bool # | |
data FTReturnField Source #
Constructors
| FTReturnField ByteString | |
| FTReturnFieldAs ByteString ByteString |
Instances
| Show FTReturnField Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTReturnField -> ShowS # show :: FTReturnField -> String # showList :: [FTReturnField] -> ShowS # | |
| Eq FTReturnField Source # | |
Defined in Database.Redis.ManualCommands.FT Methods (==) :: FTReturnField -> FTReturnField -> Bool # (/=) :: FTReturnField -> FTReturnField -> Bool # | |
data FTSummarizeOpts Source #
Constructors
| FTSummarizeOpts | |
Fields | |
Instances
| Show FTSummarizeOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTSummarizeOpts -> ShowS # show :: FTSummarizeOpts -> String # showList :: [FTSummarizeOpts] -> ShowS # | |
| Eq FTSummarizeOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods (==) :: FTSummarizeOpts -> FTSummarizeOpts -> Bool # (/=) :: FTSummarizeOpts -> FTSummarizeOpts -> Bool # | |
data FTHighlightOpts Source #
Constructors
| FTHighlightOpts | |
Fields | |
Instances
| Show FTHighlightOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTHighlightOpts -> ShowS # show :: FTHighlightOpts -> String # showList :: [FTHighlightOpts] -> ShowS # | |
| Eq FTHighlightOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods (==) :: FTHighlightOpts -> FTHighlightOpts -> Bool # (/=) :: FTHighlightOpts -> FTHighlightOpts -> Bool # | |
data FTNumericFilter Source #
Constructors
| FTNumericFilter | |
Fields | |
Instances
| Show FTNumericFilter Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTNumericFilter -> ShowS # show :: FTNumericFilter -> String # showList :: [FTNumericFilter] -> ShowS # | |
| Eq FTNumericFilter Source # | |
Defined in Database.Redis.ManualCommands.FT Methods (==) :: FTNumericFilter -> FTNumericFilter -> Bool # (/=) :: FTNumericFilter -> FTNumericFilter -> Bool # | |
data FTGeoFilter Source #
Constructors
| FTGeoFilter | |
Instances
| Show FTGeoFilter Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTGeoFilter -> ShowS # show :: FTGeoFilter -> String # showList :: [FTGeoFilter] -> ShowS # | |
| Eq FTGeoFilter Source # | |
Defined in Database.Redis.ManualCommands.FT | |
data FTSearchOpts Source #
Constructors
| FTSearchOpts | |
Fields
| |
Instances
| Show FTSearchOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTSearchOpts -> ShowS # show :: FTSearchOpts -> String # showList :: [FTSearchOpts] -> ShowS # | |
| Eq FTSearchOpts Source # | |
Defined in Database.Redis.ManualCommands.FT | |
data FTAggregateLoad Source #
Constructors
| FTAggregateLoadAll | |
| FTAggregateLoadFields (NonEmpty ByteString) |
Instances
| Show FTAggregateLoad Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTAggregateLoad -> ShowS # show :: FTAggregateLoad -> String # showList :: [FTAggregateLoad] -> ShowS # | |
| Eq FTAggregateLoad Source # | |
Defined in Database.Redis.ManualCommands.FT Methods (==) :: FTAggregateLoad -> FTAggregateLoad -> Bool # (/=) :: FTAggregateLoad -> FTAggregateLoad -> Bool # | |
data FTSortProperty Source #
Constructors
| FTSortProperty | |
Fields | |
Instances
| Show FTSortProperty Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTSortProperty -> ShowS # show :: FTSortProperty -> String # showList :: [FTSortProperty] -> ShowS # | |
| Eq FTSortProperty Source # | |
Defined in Database.Redis.ManualCommands.FT Methods (==) :: FTSortProperty -> FTSortProperty -> Bool # (/=) :: FTSortProperty -> FTSortProperty -> Bool # | |
data FTCursorOpts Source #
Constructors
| FTCursorOpts | |
Fields | |
Instances
| Show FTCursorOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTCursorOpts -> ShowS # show :: FTCursorOpts -> String # showList :: [FTCursorOpts] -> ShowS # | |
| Eq FTCursorOpts Source # | |
Defined in Database.Redis.ManualCommands.FT | |
data FTAggregateOpts Source #
Constructors
| FTAggregateOpts | |
Fields
| |
Instances
| Show FTAggregateOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTAggregateOpts -> ShowS # show :: FTAggregateOpts -> String # showList :: [FTAggregateOpts] -> ShowS # | |
| Eq FTAggregateOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods (==) :: FTAggregateOpts -> FTAggregateOpts -> Bool # (/=) :: FTAggregateOpts -> FTAggregateOpts -> Bool # | |
data FTHybridSearchClause Source #
Constructors
| FTHybridSearchClause | |
Instances
| Show FTHybridSearchClause Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTHybridSearchClause -> ShowS # show :: FTHybridSearchClause -> String # showList :: [FTHybridSearchClause] -> ShowS # | |
| Eq FTHybridSearchClause Source # | |
Defined in Database.Redis.ManualCommands.FT Methods (==) :: FTHybridSearchClause -> FTHybridSearchClause -> Bool # (/=) :: FTHybridSearchClause -> FTHybridSearchClause -> Bool # | |
data FTHybridVectorQuery Source #
Constructors
| FTHybridKnn | |
| FTHybridRange | |
Instances
| Show FTHybridVectorQuery Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTHybridVectorQuery -> ShowS # show :: FTHybridVectorQuery -> String # showList :: [FTHybridVectorQuery] -> ShowS # | |
| Eq FTHybridVectorQuery Source # | |
Defined in Database.Redis.ManualCommands.FT Methods (==) :: FTHybridVectorQuery -> FTHybridVectorQuery -> Bool # (/=) :: FTHybridVectorQuery -> FTHybridVectorQuery -> Bool # | |
data FTHybridVSimClause Source #
Constructors
| FTHybridVSimClause | |
Instances
| Show FTHybridVSimClause Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTHybridVSimClause -> ShowS # show :: FTHybridVSimClause -> String # showList :: [FTHybridVSimClause] -> ShowS # | |
| Eq FTHybridVSimClause Source # | |
Defined in Database.Redis.ManualCommands.FT Methods (==) :: FTHybridVSimClause -> FTHybridVSimClause -> Bool # (/=) :: FTHybridVSimClause -> FTHybridVSimClause -> Bool # | |
data FTHybridCombine Source #
Constructors
| FTHybridCombineRRF | |
| FTHybridCombineLinear | |
Instances
| Show FTHybridCombine Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTHybridCombine -> ShowS # show :: FTHybridCombine -> String # showList :: [FTHybridCombine] -> ShowS # | |
| Eq FTHybridCombine Source # | |
Defined in Database.Redis.ManualCommands.FT Methods (==) :: FTHybridCombine -> FTHybridCombine -> Bool # (/=) :: FTHybridCombine -> FTHybridCombine -> Bool # | |
data FTHybridSort Source #
Constructors
| FTHybridSortBy ByteString (Maybe SortOrder) | |
| FTHybridNoSort |
Instances
| Show FTHybridSort Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTHybridSort -> ShowS # show :: FTHybridSort -> String # showList :: [FTHybridSort] -> ShowS # | |
| Eq FTHybridSort Source # | |
Defined in Database.Redis.ManualCommands.FT | |
data FTHybridLoad Source #
Constructors
| FTHybridLoadFields (NonEmpty ByteString) | |
| FTHybridLoadAll |
Instances
| Show FTHybridLoad Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTHybridLoad -> ShowS # show :: FTHybridLoad -> String # showList :: [FTHybridLoad] -> ShowS # | |
| Eq FTHybridLoad Source # | |
Defined in Database.Redis.ManualCommands.FT | |
data FTHybridOpts Source #
Constructors
| FTHybridOpts | |
Fields
| |
Instances
| Show FTHybridOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTHybridOpts -> ShowS # show :: FTHybridOpts -> String # showList :: [FTHybridOpts] -> ShowS # | |
| Eq FTHybridOpts Source # | |
Defined in Database.Redis.ManualCommands.FT | |
data FTProfileQueryType Source #
Constructors
| FTProfileSearch | |
| FTProfileHybrid | |
| FTProfileAggregate |
Instances
| Show FTProfileQueryType Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTProfileQueryType -> ShowS # show :: FTProfileQueryType -> String # showList :: [FTProfileQueryType] -> ShowS # | |
| Eq FTProfileQueryType Source # | |
Defined in Database.Redis.ManualCommands.FT Methods (==) :: FTProfileQueryType -> FTProfileQueryType -> Bool # (/=) :: FTProfileQueryType -> FTProfileQueryType -> Bool # | |
| RedisArg FTProfileQueryType Source # | |
Defined in Database.Redis.ManualCommands.FT Methods | |
data FTProfileOpts Source #
Constructors
| FTProfileOpts | |
Fields | |
Instances
| Show FTProfileOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTProfileOpts -> ShowS # show :: FTProfileOpts -> String # showList :: [FTProfileOpts] -> ShowS # | |
| Eq FTProfileOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods (==) :: FTProfileOpts -> FTProfileOpts -> Bool # (/=) :: FTProfileOpts -> FTProfileOpts -> Bool # | |
data FTSpellcheckTermsMode Source #
Constructors
| FTSpellcheckInclude ByteString [ByteString] | |
| FTSpellcheckExclude ByteString [ByteString] |
Instances
| Show FTSpellcheckTermsMode Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTSpellcheckTermsMode -> ShowS # show :: FTSpellcheckTermsMode -> String # showList :: [FTSpellcheckTermsMode] -> ShowS # | |
| Eq FTSpellcheckTermsMode Source # | |
Defined in Database.Redis.ManualCommands.FT Methods (==) :: FTSpellcheckTermsMode -> FTSpellcheckTermsMode -> Bool # (/=) :: FTSpellcheckTermsMode -> FTSpellcheckTermsMode -> Bool # | |
data FTSpellcheckOpts Source #
Constructors
| FTSpellcheckOpts | |
Instances
| Show FTSpellcheckOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTSpellcheckOpts -> ShowS # show :: FTSpellcheckOpts -> String # showList :: [FTSpellcheckOpts] -> ShowS # | |
| Eq FTSpellcheckOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods (==) :: FTSpellcheckOpts -> FTSpellcheckOpts -> Bool # (/=) :: FTSpellcheckOpts -> FTSpellcheckOpts -> Bool # | |
data FTSugAddOpts Source #
Constructors
| FTSugAddDefault | |
| FTSugAddWithPayload ByteString | |
| FTSugAddIncrement | |
| FTSugAddIncrementWithPayload ByteString |
Instances
| Show FTSugAddOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTSugAddOpts -> ShowS # show :: FTSugAddOpts -> String # showList :: [FTSugAddOpts] -> ShowS # | |
| Eq FTSugAddOpts Source # | |
Defined in Database.Redis.ManualCommands.FT | |
data FTCursorReadOpts Source #
Constructors
| FTCursorReadOpts | |
Fields | |
Instances
| Show FTCursorReadOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods showsPrec :: Int -> FTCursorReadOpts -> ShowS # show :: FTCursorReadOpts -> String # showList :: [FTCursorReadOpts] -> ShowS # | |
| Eq FTCursorReadOpts Source # | |
Defined in Database.Redis.ManualCommands.FT Methods (==) :: FTCursorReadOpts -> FTCursorReadOpts -> Bool # (/=) :: FTCursorReadOpts -> FTCursorReadOpts -> Bool # | |
sortableToArgs :: FTSortable -> [ByteString] Source #
createFieldToArgs :: FTCreateField -> [ByteString] Source #
ftCreateOptsToArgs :: FTCreateOpts -> [ByteString] Source #
ftAlterOptsToArgs :: FTAlterOpts -> [ByteString] Source #
returnFieldToArgs :: FTReturnField -> [ByteString] Source #
geoFilterToArgs :: FTGeoFilter -> [ByteString] Source #
sortByToArgs :: FTSortBy -> [ByteString] Source #
ftSearchOptsToArgs :: FTSearchOpts -> [ByteString] Source #
reduceToArgs :: FTReduce -> [ByteString] Source #
groupByToArgs :: FTGroupBy -> [ByteString] Source #
applyToArgs :: FTApply -> [ByteString] Source #
cursorOptsToArgs :: FTCursorOpts -> [ByteString] Source #
hybridSortToArgs :: FTHybridSort -> [ByteString] Source #
hybridLoadToArgs :: FTHybridLoad -> [ByteString] Source #
ftHybridOptsToArgs :: FTHybridOpts -> [ByteString] Source #
ftSugAddOptsToArgs :: FTSugAddOpts -> [ByteString] Source #
ftList :: RedisCtx m f => m (f [ByteString]) Source #
Returns a list of all existing indexes (https://redis.io/commands/ft._list).
O(1)
Since RediSearch 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Index name. |
| -> ByteString | Query string. |
| -> m (f Reply) |
Run a search query on an index and perform aggregate transformations on the results (https://redis.io/commands/ft.aggregate).
The reply shape varies with options such as WITHCURSOR, so this wrapper returns the raw Reply.
O(1)
Since RediSearch 1.1.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Index name. |
| -> ByteString | Query string. |
| -> FTAggregateOpts | Aggregate options and transformation steps. |
| -> m (f Reply) |
Run a search query on an index and perform aggregate transformations on the results (https://redis.io/commands/ft.aggregate).
The reply shape varies with options such as WITHCURSOR, so this wrapper returns the raw Reply.
O(1)
Since RediSearch 1.1.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Alias name. |
| -> ByteString | Index name. |
| -> m (f Status) |
Arguments
| :: RedisCtx m f | |
| => ByteString | Alias name. |
| -> m (f Status) |
Arguments
| :: RedisCtx m f | |
| => ByteString | Alias name. |
| -> ByteString | Index name. |
| -> m (f Status) |
Adds or updates an alias to the index (https://redis.io/commands/ft.aliasupdate).
O(1)
Since RediSearch 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Index name. |
| -> FTCreateField | Field definition to append to the schema. |
| -> m (f Status) |
Adds a new field to the index (https://redis.io/commands/ft.alter).
O(N) where N is the number of keys in the keyspace
Since RediSearch 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Index name. |
| -> FTCreateField | Field definition to append to the schema. |
| -> FTAlterOpts | Alter options. |
| -> m (f Status) |
Adds a new field to the index (https://redis.io/commands/ft.alter).
O(N) where N is the number of keys in the keyspace
Since RediSearch 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Option name. |
| -> ByteString | Option value. |
| -> m (f Status) |
Sets runtime configuration options (https://redis.io/commands/ft.config-set).
O(1)
Since RediSearch 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Option name or pattern. |
| -> m (f Reply) |
Retrieves runtime configuration options (https://redis.io/commands/ft.config-get).
The server returns an option-dependent reply payload, so this wrapper returns the raw Reply.
O(1)
Since RediSearch 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Index name. |
| -> NonEmpty FTCreateField | Schema field definitions. |
| -> m (f Status) |
Creates an index with the given spec (https://redis.io/commands/ft.create).
O(K) at creation where K is the number of fields, O(N) if scanning the keyspace is triggered, where N is the number of keys in the keyspace
Since RediSearch 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Index name. |
| -> NonEmpty FTCreateField | Schema field definitions. |
| -> FTCreateOpts | Index creation options. |
| -> m (f Status) |
Creates an index with the given spec (https://redis.io/commands/ft.create).
O(K) at creation where K is the number of fields, O(N) if scanning the keyspace is triggered, where N is the number of keys in the keyspace
Since RediSearch 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Index name. |
| -> Integer | Cursor identifier. |
| -> m (f Status) |
Arguments
| :: RedisCtx m f | |
| => ByteString | Index name. |
| -> Integer | Cursor identifier. |
| -> m (f Reply) |
Reads from a cursor (https://redis.io/commands/ft.cursor-read).
The cursor batch payload is command-dependent, so this wrapper returns the raw Reply.
O(1)
Since RediSearch 1.1.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Index name. |
| -> Integer | Cursor identifier. |
| -> FTCursorReadOpts | Cursor read options. |
| -> m (f Reply) |
Reads from a cursor (https://redis.io/commands/ft.cursor-read).
The cursor batch payload is command-dependent, so this wrapper returns the raw Reply.
O(1)
Since RediSearch 1.1.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Dictionary name. |
| -> NonEmpty ByteString | Terms to add. |
| -> m (f Integer) |
Arguments
| :: RedisCtx m f | |
| => ByteString | Dictionary name. |
| -> NonEmpty ByteString | Terms to delete. |
| -> m (f Integer) |
Arguments
| :: RedisCtx m f | |
| => ByteString | Index name. |
| -> m (f Status) |
Deletes the index (https://redis.io/commands/ft.dropindex).
O(1) or O(N) if documents are deleted, where N is the number of keys in the keyspace
Since RediSearch 2.0.0
ftDropIndexDeleteDocs Source #
Arguments
| :: RedisCtx m f | |
| => ByteString | Index name. |
| -> m (f Status) |
Deletes the index (https://redis.io/commands/ft.dropindex).
This variant also deletes indexed documents.
O(1) or O(N) if documents are deleted, where N is the number of keys in the keyspace
Since RediSearch 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Index name. |
| -> ByteString | Query string. |
| -> m (f ByteString) |
Returns the execution plan for a complex query (https://redis.io/commands/ft.explain).
O(1)
Since RediSearch 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Index name. |
| -> ByteString | Query string. |
| -> FTExplainOpts | Explain options. |
| -> m (f ByteString) |
Returns the execution plan for a complex query (https://redis.io/commands/ft.explain).
O(1)
Since RediSearch 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Index name. |
| -> FTHybridSearchClause | Textual search clause. |
| -> FTHybridVSimClause | Vector similarity clause. |
| -> m (f Reply) |
Performs hybrid search combining text search and vector similarity with configurable fusion methods (https://redis.io/commands/ft.hybrid).
The reply shape depends on requested projections and scoring options, so this wrapper returns the raw Reply.
O(N)
Since Redis Open Source 8.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Index name. |
| -> FTHybridSearchClause | Textual search clause. |
| -> FTHybridVSimClause | Vector similarity clause. |
| -> FTHybridOpts | Hybrid query options. |
| -> m (f Reply) |
Performs hybrid search combining text search and vector similarity with configurable fusion methods (https://redis.io/commands/ft.hybrid).
The reply shape depends on requested projections and scoring options, so this wrapper returns the raw Reply.
O(N)
Since Redis Open Source 8.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Index name. |
| -> m (f Reply) |
Returns information and statistics on the index (https://redis.io/commands/ft.info).
The response is a heterogeneous attribute map, so this wrapper returns the raw Reply.
O(1)
Since RediSearch 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Index name. |
| -> FTProfileQueryType | Wrapped query type. |
| -> ByteString | Query payload for the wrapped command. |
| -> m (f Reply) |
Performs a SEARCH or AGGREGATE command and collects performance information (https://redis.io/commands/ft.profile).
The profiled reply depends on the wrapped query type, so this wrapper returns the raw Reply.
O(N)
Since RediSearch 2.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Index name. |
| -> FTProfileQueryType | Wrapped query type. |
| -> ByteString | Query payload for the wrapped command. |
| -> FTProfileOpts | Profiling options. |
| -> m (f Reply) |
Performs a SEARCH or AGGREGATE command and collects performance information (https://redis.io/commands/ft.profile).
The profiled reply depends on the wrapped query type, so this wrapper returns the raw Reply.
O(N)
Since RediSearch 2.2.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Index name. |
| -> ByteString | Query string. |
| -> m (f Reply) |
Searches the index with a textual query, returning either documents or just ids (https://redis.io/commands/ft.search).
The reply shape depends on output flags such as NOCONTENT and WITHSCORES, so this wrapper returns the raw Reply.
O(N)
Since RediSearch 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Index name. |
| -> ByteString | Query string. |
| -> FTSearchOpts | Search options. |
| -> m (f Reply) |
Searches the index with a textual query, returning either documents or just ids (https://redis.io/commands/ft.search).
The reply shape depends on output flags such as NOCONTENT and WITHSCORES, so this wrapper returns the raw Reply.
O(N)
Since RediSearch 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Index name. |
| -> ByteString | Query string. |
| -> m (f Reply) |
Performs spelling correction on a query, returning suggestions for misspelled terms (https://redis.io/commands/ft.spellcheck).
The response contains nested suggestions, so this wrapper returns the raw Reply.
O(1)
Since RediSearch 1.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Index name. |
| -> ByteString | Query string. |
| -> FTSpellcheckOpts | Spellcheck options. |
| -> m (f Reply) |
Performs spelling correction on a query, returning suggestions for misspelled terms (https://redis.io/commands/ft.spellcheck).
The response contains nested suggestions, so this wrapper returns the raw Reply.
O(1)
Since RediSearch 1.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Suggestion dictionary key. |
| -> ByteString | Suggestion string. |
| -> Double | Suggestion score. |
| -> m (f Integer) |
Adds a suggestion string to an auto-complete suggestion dictionary (https://redis.io/commands/ft.sugadd).
O(1)
Since RediSearch 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Suggestion dictionary key. |
| -> ByteString | Suggestion string. |
| -> Double | Suggestion score. |
| -> FTSugAddOpts | Suggestion insertion options. |
| -> m (f Integer) |
Adds a suggestion string to an auto-complete suggestion dictionary (https://redis.io/commands/ft.sugadd).
O(1)
Since RediSearch 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Suggestion dictionary key. |
| -> ByteString | Suggestion string. |
| -> m (f Integer) |
Deletes a string from a suggestion index (https://redis.io/commands/ft.sugdel).
O(1)
Since RediSearch 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Suggestion dictionary key. |
| -> m (f Integer) |
Gets the size of an auto-complete suggestion dictionary (https://redis.io/commands/ft.suglen).
O(1)
Since RediSearch 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Index name. |
| -> ByteString | Tag field name. |
| -> m (f [ByteString]) |
Returns the distinct tags indexed in a Tag field (https://redis.io/commands/ft.tagvals).
O(n) where n is the number of distinct tags in the field
Since RediSearch 1.0.0
Constructors
| CMSInfo | |
Fields
| |
data CMSMergeOpts Source #
Constructors
| CMSMergeUnweighted (NonEmpty ByteString) | Merge the given source sketches using the default weight of |
| CMSMergeWeighted (NonEmpty (ByteString, Integer)) | Merge the given source sketches using an explicit weight for each source. |
Instances
| Show CMSMergeOpts Source # | |
Defined in Database.Redis.ManualCommands.Cms Methods showsPrec :: Int -> CMSMergeOpts -> ShowS # show :: CMSMergeOpts -> String # showList :: [CMSMergeOpts] -> ShowS # | |
| Eq CMSMergeOpts Source # | |
Defined in Database.Redis.ManualCommands.Cms | |
cmsMergeOptsToArgs :: CMSMergeOpts -> [ByteString] Source #
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Count-Min Sketch. |
| -> NonEmpty (ByteString, Integer) | Item and increment pairs. |
| -> m (f [Integer]) |
Increases the count of one or more items by increment (https://redis.io/commands/cms.incrby).
O(n) where n is the number of items
Since RedisBloom 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Count-Min Sketch. |
| -> m (f CMSInfo) |
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Count-Min Sketch to create. |
| -> Integer | Number of counters in each row. |
| -> Integer | Number of counter rows. |
| -> m (f Status) |
Initializes a Count-Min Sketch to dimensions specified by user (https://redis.io/commands/cms.initbydim).
O(1)
Since RedisBloom 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Count-Min Sketch to create. |
| -> Double | Error factor. |
| -> Double | Probability of the error factor. |
| -> m (f Status) |
Initializes a Count-Min Sketch to accommodate requested tolerances (https://redis.io/commands/cms.initbyprob).
O(1)
Since RedisBloom 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Destination sketch key. |
| -> NonEmpty ByteString | Source sketch keys. |
| -> m (f Status) |
Merges several sketches into one sketch (https://redis.io/commands/cms.merge).
Source sketches are merged with the default weight of 1.
O(n) where n is the number of sketches
Since RedisBloom 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Destination sketch key. |
| -> CMSMergeOpts | Source sketches with optional weights. |
| -> m (f Status) |
Merges several sketches into one sketch (https://redis.io/commands/cms.merge).
O(n) where n is the number of sketches
Since RedisBloom 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Destination sketch key. |
| -> NonEmpty (ByteString, Integer) | Source sketch keys paired with weights. |
| -> m (f Status) |
Merges several sketches into one sketch (https://redis.io/commands/cms.merge).
O(n) where n is the number of sketches
Since RedisBloom 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Count-Min Sketch. |
| -> NonEmpty ByteString | Items to query. |
| -> m (f [Integer]) |
Returns the count for one or more items in a sketch (https://redis.io/commands/cms.query).
O(n) where n is the number of items
Since RedisBloom 2.0.0
Constructors
| CFInfo | |
Fields
| |
data CFReserveOpts Source #
Constructors
| CFReserveOpts | |
Fields
| |
Instances
| Show CFReserveOpts Source # | |
Defined in Database.Redis.ManualCommands.CF Methods showsPrec :: Int -> CFReserveOpts -> ShowS # show :: CFReserveOpts -> String # showList :: [CFReserveOpts] -> ShowS # | |
| Eq CFReserveOpts Source # | |
Defined in Database.Redis.ManualCommands.CF Methods (==) :: CFReserveOpts -> CFReserveOpts -> Bool # (/=) :: CFReserveOpts -> CFReserveOpts -> Bool # | |
data CFInsertOpts Source #
Constructors
| CFInsertOpts | |
Fields
| |
Instances
| Show CFInsertOpts Source # | |
Defined in Database.Redis.ManualCommands.CF Methods showsPrec :: Int -> CFInsertOpts -> ShowS # show :: CFInsertOpts -> String # showList :: [CFInsertOpts] -> ShowS # | |
| Eq CFInsertOpts Source # | |
Defined in Database.Redis.ManualCommands.CF | |
data CFInsertResult Source #
Constructors
| CFInsertAdded | |
| CFInsertAlreadyExists | |
| CFInsertFilterFull |
Instances
| Show CFInsertResult Source # | |
Defined in Database.Redis.ManualCommands.CF Methods showsPrec :: Int -> CFInsertResult -> ShowS # show :: CFInsertResult -> String # showList :: [CFInsertResult] -> ShowS # | |
| Eq CFInsertResult Source # | |
Defined in Database.Redis.ManualCommands.CF Methods (==) :: CFInsertResult -> CFInsertResult -> Bool # (/=) :: CFInsertResult -> CFInsertResult -> Bool # | |
| RedisResult CFInsertResult Source # | |
Defined in Database.Redis.ManualCommands.CF | |
cfInsertOptsToArgs :: CFInsertOpts -> [ByteString] Source #
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Cuckoo filter. |
| -> ByteString | Item to add. |
| -> m (f Bool) |
Adds an item to a Cuckoo filter (https://redis.io/commands/cf.add).
A filter is created automatically if the key does not exist.
O(k + i), where k is the number of sub-filters and i is maxIterations.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Cuckoo filter. |
| -> ByteString | Item to add. |
| -> m (f Bool) |
Adds an item to a Cuckoo filter only if it did not already exist (https://redis.io/commands/cf.addnx).
A filter is created automatically if the key does not exist.
O(k + i), where k is the number of sub-filters and i is maxIterations.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Cuckoo filter. |
| -> ByteString | Item to count. |
| -> m (f Integer) |
Returns the number of times an item might appear in a Cuckoo filter (https://redis.io/commands/cf.count).
Returns 0 when the key does not exist or the item was not found.
O(k), where k is the number of sub-filters.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Cuckoo filter. |
| -> ByteString | Item to delete. |
| -> m (f Bool) |
Deletes an item from a Cuckoo filter (https://redis.io/commands/cf.del).
Returns False when the key does not exist or the item was not found.
O(k), where k is the number of sub-filters.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Cuckoo filter. |
| -> ByteString | Item to check. |
| -> m (f Bool) |
Checks whether an item may exist in a Cuckoo filter (https://redis.io/commands/cf.exists).
Returns False when the key does not exist or the item is definitely absent.
O(k), where k is the number of sub-filters.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Cuckoo filter. |
| -> m (f CFInfo) |
Returns information about a Cuckoo filter (https://redis.io/commands/cf.info).
O(1)
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Cuckoo filter. |
| -> NonEmpty ByteString | Items to add. |
| -> m (f [CFInsertResult]) |
Adds one or more items to a Cuckoo filter, creating it when needed (https://redis.io/commands/cf.insert).
This is equivalent to inserting with default options and automatic creation enabled.
O(n * (k + i)), where n is the number of items, k is the number of sub-filters, and i is maxIterations.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Cuckoo filter. |
| -> NonEmpty ByteString | Items to add. |
| -> CFInsertOpts | Optional creation parameters. |
| -> m (f [CFInsertResult]) |
Adds one or more items to a Cuckoo filter, creating it when needed (https://redis.io/commands/cf.insert).
O(n * (k + i)), where n is the number of items, k is the number of sub-filters, and i is maxIterations.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Cuckoo filter. |
| -> NonEmpty ByteString | Items to add. |
| -> m (f [CFInsertResult]) |
Adds one or more items to a Cuckoo filter only if they did not already exist (https://redis.io/commands/cf.insertnx).
This is equivalent to inserting with default options and automatic creation enabled.
O(n * (k + i)), where n is the number of items, k is the number of sub-filters, and i is maxIterations.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Cuckoo filter. |
| -> NonEmpty ByteString | Items to add. |
| -> CFInsertOpts | Optional creation parameters. |
| -> m (f [CFInsertResult]) |
Adds one or more items to a Cuckoo filter only if they did not already exist (https://redis.io/commands/cf.insertnx).
O(n * (k + i)), where n is the number of items, k is the number of sub-filters, and i is maxIterations.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Cuckoo filter. |
| -> NonEmpty ByteString | Items to check. |
| -> m (f [Bool]) |
Checks whether one or more items may exist in a Cuckoo filter (https://redis.io/commands/cf.mexists).
A False result means the item is definitely absent, or the key does not exist.
O(k * n), where k is the number of sub-filters and n is the number of items.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Cuckoo filter to create. |
| -> Integer | Initial capacity. |
| -> m (f Status) |
Creates an empty Cuckoo filter (https://redis.io/commands/cf.reserve).
The filter will fail if the key already exists.
O(1)
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Cuckoo filter to create. |
| -> Integer | Initial capacity. |
| -> CFReserveOpts | Bucket and scaling options. |
| -> m (f Status) |
Constructors
| BFInfo | |
Fields
| |
data BFReserveOpts Source #
Constructors
| BFReserveOpts | |
Fields
| |
Instances
| Show BFReserveOpts Source # | |
Defined in Database.Redis.ManualCommands.BF Methods showsPrec :: Int -> BFReserveOpts -> ShowS # show :: BFReserveOpts -> String # showList :: [BFReserveOpts] -> ShowS # | |
| Eq BFReserveOpts Source # | |
Defined in Database.Redis.ManualCommands.BF Methods (==) :: BFReserveOpts -> BFReserveOpts -> Bool # (/=) :: BFReserveOpts -> BFReserveOpts -> Bool # | |
data BFInsertOpts Source #
Constructors
| BFInsertOpts | |
Fields
| |
Instances
| Show BFInsertOpts Source # | |
Defined in Database.Redis.ManualCommands.BF Methods showsPrec :: Int -> BFInsertOpts -> ShowS # show :: BFInsertOpts -> String # showList :: [BFInsertOpts] -> ShowS # | |
| Eq BFInsertOpts Source # | |
Defined in Database.Redis.ManualCommands.BF | |
bfInsertOptsToArgs :: BFInsertOpts -> [ByteString] Source #
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Bloom filter. |
| -> ByteString | Item to add to the Bloom filter. |
| -> m (f Bool) |
Adds an item to a Bloom filter (https://redis.io/commands/bf.add).
A filter is created automatically if the key does not exist.
O(k), where k is the number of hash functions used by the last sub-filter.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Bloom filter. |
| -> m (f Integer) |
Returns the cardinality of a Bloom filter (https://redis.io/commands/bf.card).
Returns 0 when the key does not exist.
O(1)
Since RedisBloom 2.4.4
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Bloom filter. |
| -> ByteString | Item to check. |
| -> m (f Bool) |
Determines whether an item was added to a Bloom filter (https://redis.io/commands/bf.exists).
Returns False when the key does not exist or the item was definitely not added.
O(k), where $k$ is the number of hash functions used by the last sub-filter.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Bloom filter. |
| -> m (f BFInfo) |
Returns information about a Bloom filter (https://redis.io/commands/bf.info).
O(1)
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Bloom filter. |
| -> m (f [Integer]) |
Returns the configured capacity of a Bloom filter (https://redis.io/commands/bf.info).
O(1)
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Bloom filter. |
| -> m (f [Integer]) |
Returns the size in bytes of a Bloom filter (https://redis.io/commands/bf.info).
O(1)
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Bloom filter. |
| -> m (f [Integer]) |
Returns the number of sub-filters in a Bloom filter (https://redis.io/commands/bf.info).
O(1)
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Bloom filter. |
| -> m (f [Integer]) |
Returns the number of unique inserted items detected by a Bloom filter (https://redis.io/commands/bf.info).
O(1)
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Bloom filter. |
| -> m (f [Maybe Integer]) |
Returns the expansion rate of a Bloom filter (https://redis.io/commands/bf.info).
O(1)
Returns Nothing for the non scaling filters.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Bloom filter. |
| -> NonEmpty ByteString | Items to add. |
| -> m (f [Bool]) |
Adds one or more items to a Bloom filter, creating it when needed (https://redis.io/commands/bf.insert).
This is equivalent to inserting with default options and automatic creation enabled.
O(kn), where k is the number of hash functions and n is the number of items.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Bloom filter. |
| -> NonEmpty ByteString | Items to add. |
| -> BFInsertOpts | Optional creation and scaling parameters. |
| -> m (f [Bool]) |
Adds one or more items to a Bloom filter, creating it when needed (https://redis.io/commands/bf.insert).
O(kn), where k is the number of hash functions and n is the number of items.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Bloom filter. |
| -> NonEmpty ByteString | Items to add. |
| -> m (f [Bool]) |
Adds one or more items to a Bloom filter (https://redis.io/commands/bf.madd).
A filter is created automatically if the key does not exist.
O(kn), where k is the number of hash functions and n is the number of items.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Bloom filter. |
| -> NonEmpty ByteString | Items to check. |
| -> m (f [Bool]) |
Checks whether one or more items were added to a Bloom filter (https://redis.io/commands/bf.mexists).
A False result means the item is definitely absent, or the key does not exist.
O(kn), where k is the number of hash functions and n is the number of items.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Bloom filter to create. |
| -> Double | Desired false positive probability, between |
| -> Integer | Initial capacity. |
| -> m (f Status) |
Creates an empty Bloom filter (https://redis.io/commands/bf.reserve).
The filter will fail if the key already exists.
O(1)
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Bloom filter to create. |
| -> Double | Desired false positive probability, between |
| -> Integer | Initial capacity. |
| -> BFReserveOpts | Scaling options for the reserved filter. |
| -> m (f Status) |