diff options
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) |
