diff options
| author | LLLL Colonq <llll@colonq> | 2025-11-14 20:56:47 -0500 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2025-11-14 20:56:47 -0500 |
| commit | a69da398584644daf975db58a3ff893d29d155eb (patch) | |
| tree | 4bd475f3f7b58d284acc41ed99457efeea305afa /fig-web/src/Fig/Web/DB.hs | |
| parent | 48080c62a05dff885a10ac6b6d548a8ab3582a42 (diff) | |
Add TCG
Diffstat (limited to 'fig-web/src/Fig/Web/DB.hs')
| -rw-r--r-- | fig-web/src/Fig/Web/DB.hs | 4 |
1 files changed, 4 insertions, 0 deletions
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 |
