diff options
| author | LLLL Colonq <llll@colonq> | 2026-09-22 00:06:29 -0400 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2026-09-22 00:06:29 -0400 |
| commit | 7abb751eb3d9213ba690ed4ae6b0dbbc099d8e46 (patch) | |
| tree | c051022c2eca4373233a874d1d714d58e807d97e /src/wasp-db.el | |
| parent | 07f5a19d7930d1d912d05c95d9cc5b4b0c407383 (diff) | |
Diffstat (limited to 'src/wasp-db.el')
| -rw-r--r-- | src/wasp-db.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/wasp-db.el b/src/wasp-db.el index 0311860b..da4c5c05 100644 --- a/src/wasp-db.el +++ b/src/wasp-db.el @@ -185,6 +185,14 @@ Afterward call K." (w/db-cmd `("LPUSH" ,key ,@vals) (lambda (_) nil)) (error "Redis key must be a string"))) +(defun w/db-llen (key k) + "Get the length of list KEY from Redis and pass to K." + (w/db-cmd `("LLEN" ,key) k)) + +(defun w/db-lindex (key idx k) + "Get the value at IDX in list KEY from Redis and pass to K." + (w/db-cmd `("LINDEX" ,key ,(format "%s" idx)) k)) + (defun w/db-sadd (key &rest vals) "Add VALS to the set at KEY in Redis." (if (stringp key) |
