From a69da398584644daf975db58a3ff893d29d155eb Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Fri, 14 Nov 2025 20:56:47 -0500 Subject: Add TCG --- fig-web/src/Fig/Web/DB.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'fig-web/src/Fig/Web/DB.hs') diff --git a/fig-web/src/Fig/Web/DB.hs b/fig-web/src/Fig/Web/DB.hs index 0f600c6..4408d6b 100644 --- a/fig-web/src/Fig/Web/DB.hs +++ b/fig-web/src/Fig/Web/DB.hs @@ -97,6 +97,10 @@ rpush (DB c) key val = liftIO $ Redis.runRedis c do _ <- Redis.rpush key [val] pure () +lrange :: MonadIO m => DB -> ByteString -> Integer -> Integer -> m [ByteString] +lrange (DB c) key start end = liftIO $ Redis.runRedis c do + fromMaybe [] . hush <$> Redis.lrange key start end + llen :: MonadIO m => DB -> ByteString -> m (Maybe Integer) llen (DB c) key = liftIO $ Redis.runRedis c do hush <$> Redis.llen key -- cgit v1.2.3