@upstash/redis 1.40.0 → 1.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/{chunk-RLVWMRRX.mjs → chunk-CGMWROAN.mjs} +557 -4
- package/cloudflare.d.mts +2 -2
- package/cloudflare.d.ts +2 -2
- package/cloudflare.js +557 -4
- package/cloudflare.mjs +1 -1
- package/docs/advanced.mdx +83 -0
- package/docs/commands/array/arcount.mdx +28 -0
- package/docs/commands/array/ardel.mdx +30 -0
- package/docs/commands/array/ardelrange.mdx +32 -0
- package/docs/commands/array/arget.mdx +33 -0
- package/docs/commands/array/argetrange.mdx +38 -0
- package/docs/commands/array/argrep.mdx +69 -0
- package/docs/commands/array/arinfo.mdx +49 -0
- package/docs/commands/array/arinsert.mdx +32 -0
- package/docs/commands/array/arlastitems.mdx +40 -0
- package/docs/commands/array/arlen.mdx +28 -0
- package/docs/commands/array/armget.mdx +31 -0
- package/docs/commands/array/armset.mdx +31 -0
- package/docs/commands/array/arnext.mdx +25 -0
- package/docs/commands/array/arop.mdx +44 -0
- package/docs/commands/array/arring.mdx +36 -0
- package/docs/commands/array/arscan.mdx +42 -0
- package/docs/commands/array/arseek.mdx +34 -0
- package/docs/commands/array/arset.mdx +35 -0
- package/docs/commands/auth/echo.mdx +24 -0
- package/docs/commands/auth/ping.mdx +21 -0
- package/docs/commands/bitmap/bitcount.mdx +39 -0
- package/docs/commands/bitmap/bitop.mdx +142 -0
- package/docs/commands/bitmap/bitpos.mdx +39 -0
- package/docs/commands/bitmap/getbit.mdx +28 -0
- package/docs/commands/bitmap/setbit.mdx +31 -0
- package/docs/commands/connection/client_setinfo.mdx +91 -0
- package/docs/commands/functions/call.mdx +72 -0
- package/docs/commands/functions/call_ro.mdx +57 -0
- package/docs/commands/functions/delete.mdx +22 -0
- package/docs/commands/functions/flush.mdx +16 -0
- package/docs/commands/functions/list.mdx +72 -0
- package/docs/commands/functions/load.mdx +64 -0
- package/docs/commands/functions/stats.mdx +46 -0
- package/docs/commands/generic/del.mdx +29 -0
- package/docs/commands/generic/exists.mdx +26 -0
- package/docs/commands/generic/expire.mdx +29 -0
- package/docs/commands/generic/expireat.mdx +29 -0
- package/docs/commands/generic/keys.mdx +32 -0
- package/docs/commands/generic/persist.mdx +23 -0
- package/docs/commands/generic/pexpire.mdx +28 -0
- package/docs/commands/generic/pexpireat.mdx +29 -0
- package/docs/commands/generic/pttl.mdx +23 -0
- package/docs/commands/generic/randomkey.mdx +21 -0
- package/docs/commands/generic/rename.mdx +28 -0
- package/docs/commands/generic/renamenx.mdx +28 -0
- package/docs/commands/generic/scan.mdx +38 -0
- package/docs/commands/generic/touch.mdx +23 -0
- package/docs/commands/generic/ttl.mdx +23 -0
- package/docs/commands/generic/type.mdx +27 -0
- package/docs/commands/generic/unlink.mdx +29 -0
- package/docs/commands/hash/hdel.mdx +28 -0
- package/docs/commands/hash/hexists.mdx +30 -0
- package/docs/commands/hash/hexpire.mdx +49 -0
- package/docs/commands/hash/hexpireat.mdx +48 -0
- package/docs/commands/hash/hexpiretime.mdx +35 -0
- package/docs/commands/hash/hget.mdx +29 -0
- package/docs/commands/hash/hgetall.mdx +27 -0
- package/docs/commands/hash/hgetdel.mdx +67 -0
- package/docs/commands/hash/hgetex.mdx +123 -0
- package/docs/commands/hash/hincrby.mdx +34 -0
- package/docs/commands/hash/hincrbyfloat.mdx +34 -0
- package/docs/commands/hash/hkeys.mdx +28 -0
- package/docs/commands/hash/hlen.mdx +28 -0
- package/docs/commands/hash/hmget.mdx +33 -0
- package/docs/commands/hash/hpersist.mdx +37 -0
- package/docs/commands/hash/hpexpire.mdx +50 -0
- package/docs/commands/hash/hpexpireat.mdx +48 -0
- package/docs/commands/hash/hpexpiretime.mdx +35 -0
- package/docs/commands/hash/hpttl.mdx +35 -0
- package/docs/commands/hash/hrandfield.mdx +57 -0
- package/docs/commands/hash/hscan.mdx +65 -0
- package/docs/commands/hash/hset.mdx +32 -0
- package/docs/commands/hash/hsetex.mdx +186 -0
- package/docs/commands/hash/hsetnx.mdx +30 -0
- package/docs/commands/hash/hstrlen.mdx +28 -0
- package/docs/commands/hash/httl.mdx +35 -0
- package/docs/commands/hash/hvals.mdx +29 -0
- package/docs/commands/json/arrappend.mdx +35 -0
- package/docs/commands/json/arrindex.mdx +37 -0
- package/docs/commands/json/arrinsert.mdx +34 -0
- package/docs/commands/json/arrlen.mdx +26 -0
- package/docs/commands/json/arrpop.mdx +36 -0
- package/docs/commands/json/arrtrim.mdx +34 -0
- package/docs/commands/json/clear.mdx +30 -0
- package/docs/commands/json/del.mdx +26 -0
- package/docs/commands/json/forget.mdx +26 -0
- package/docs/commands/json/get.mdx +53 -0
- package/docs/commands/json/merge.mdx +32 -0
- package/docs/commands/json/mget.mdx +27 -0
- package/docs/commands/json/mset.mdx +26 -0
- package/docs/commands/json/numincrby.mdx +33 -0
- package/docs/commands/json/nummultby.mdx +33 -0
- package/docs/commands/json/objkeys.mdx +27 -0
- package/docs/commands/json/objlen.mdx +27 -0
- package/docs/commands/json/set.mdx +42 -0
- package/docs/commands/json/strappend.mdx +32 -0
- package/docs/commands/json/strlen.mdx +26 -0
- package/docs/commands/json/toggle.mdx +28 -0
- package/docs/commands/json/type.mdx +28 -0
- package/docs/commands/list/lindex.mdx +32 -0
- package/docs/commands/list/linsert.mdx +41 -0
- package/docs/commands/list/llen.mdx +26 -0
- package/docs/commands/list/lmove.mdx +34 -0
- package/docs/commands/list/lpop.mdx +37 -0
- package/docs/commands/list/lpos.mdx +56 -0
- package/docs/commands/list/lpush.mdx +32 -0
- package/docs/commands/list/lpushx.mdx +38 -0
- package/docs/commands/list/lrange.mdx +37 -0
- package/docs/commands/list/lrem.mdx +33 -0
- package/docs/commands/list/lset.mdx +34 -0
- package/docs/commands/list/ltrim.mdx +33 -0
- package/docs/commands/list/rpop.mdx +37 -0
- package/docs/commands/list/rpush.mdx +32 -0
- package/docs/commands/list/rpushx.mdx +38 -0
- package/docs/commands/overview.mdx +692 -0
- package/docs/commands/pubsub/psubscribe.mdx +36 -0
- package/docs/commands/pubsub/publish.mdx +27 -0
- package/docs/commands/pubsub/subscribe.mdx +28 -0
- package/docs/commands/scripts/eval.mdx +36 -0
- package/docs/commands/scripts/eval_ro.mdx +36 -0
- package/docs/commands/scripts/evalsha.mdx +36 -0
- package/docs/commands/scripts/evalsha_ro.mdx +36 -0
- package/docs/commands/scripts/script_exists.mdx +26 -0
- package/docs/commands/scripts/script_flush.mdx +28 -0
- package/docs/commands/scripts/script_load.mdx +28 -0
- package/docs/commands/server/dbsize.mdx +22 -0
- package/docs/commands/server/flushall.mdx +25 -0
- package/docs/commands/server/flushdb.mdx +25 -0
- package/docs/commands/set/sadd.mdx +32 -0
- package/docs/commands/set/scard.mdx +26 -0
- package/docs/commands/set/sdiff.mdx +27 -0
- package/docs/commands/set/sdiffstore.mdx +32 -0
- package/docs/commands/set/sinter.mdx +27 -0
- package/docs/commands/set/sinterstore.mdx +33 -0
- package/docs/commands/set/sismember.mdx +30 -0
- package/docs/commands/set/smembers.mdx +25 -0
- package/docs/commands/set/smismember.mdx +31 -0
- package/docs/commands/set/smove.mdx +34 -0
- package/docs/commands/set/spop.mdx +36 -0
- package/docs/commands/set/srandmember.mdx +36 -0
- package/docs/commands/set/srem.mdx +29 -0
- package/docs/commands/set/sscan.mdx +39 -0
- package/docs/commands/set/sunion.mdx +27 -0
- package/docs/commands/set/sunionstore.mdx +33 -0
- package/docs/commands/stream/xack.mdx +37 -0
- package/docs/commands/stream/xackdel.mdx +211 -0
- package/docs/commands/stream/xadd.mdx +137 -0
- package/docs/commands/stream/xautoclaim.mdx +80 -0
- package/docs/commands/stream/xclaim.mdx +84 -0
- package/docs/commands/stream/xdel.mdx +34 -0
- package/docs/commands/stream/xdelex.mdx +119 -0
- package/docs/commands/stream/xgroup.mdx +141 -0
- package/docs/commands/stream/xinfo.mdx +77 -0
- package/docs/commands/stream/xlen.mdx +22 -0
- package/docs/commands/stream/xpending.mdx +75 -0
- package/docs/commands/stream/xrange.mdx +59 -0
- package/docs/commands/stream/xread.mdx +65 -0
- package/docs/commands/stream/xreadgroup.mdx +87 -0
- package/docs/commands/stream/xrevrange.mdx +65 -0
- package/docs/commands/stream/xtrim.mdx +75 -0
- package/docs/commands/string/append.mdx +28 -0
- package/docs/commands/string/decr.mdx +27 -0
- package/docs/commands/string/decrby.mdx +30 -0
- package/docs/commands/string/get.mdx +34 -0
- package/docs/commands/string/getdel.mdx +29 -0
- package/docs/commands/string/getrange.mdx +34 -0
- package/docs/commands/string/getset.mdx +28 -0
- package/docs/commands/string/incr.mdx +27 -0
- package/docs/commands/string/incrby.mdx +30 -0
- package/docs/commands/string/incrbyfloat.mdx +30 -0
- package/docs/commands/string/mget.mdx +31 -0
- package/docs/commands/string/mset.mdx +32 -0
- package/docs/commands/string/msetnx.mdx +29 -0
- package/docs/commands/string/set.mdx +79 -0
- package/docs/commands/string/setrange.mdx +38 -0
- package/docs/commands/string/strlen.mdx +26 -0
- package/docs/commands/transaction.mdx +22 -0
- package/docs/commands/zset/zadd.mdx +102 -0
- package/docs/commands/zset/zcard.mdx +31 -0
- package/docs/commands/zset/zcount.mdx +47 -0
- package/docs/commands/zset/zdiffstore.mdx +33 -0
- package/docs/commands/zset/zincrby.mdx +37 -0
- package/docs/commands/zset/zinterstore.mdx +98 -0
- package/docs/commands/zset/zlexcount.mdx +43 -0
- package/docs/commands/zset/zmscore.mdx +34 -0
- package/docs/commands/zset/zpopmax.mdx +25 -0
- package/docs/commands/zset/zpopmin.mdx +25 -0
- package/docs/commands/zset/zrange.mdx +85 -0
- package/docs/commands/zset/zrank.mdx +29 -0
- package/docs/commands/zset/zrem.mdx +33 -0
- package/docs/commands/zset/zremrangebylex.mdx +32 -0
- package/docs/commands/zset/zremrangebyrank.mdx +32 -0
- package/docs/commands/zset/zremrangebyscore.mdx +32 -0
- package/docs/commands/zset/zrevrank.mdx +29 -0
- package/docs/commands/zset/zscan.mdx +58 -0
- package/docs/commands/zset/zscore.mdx +34 -0
- package/docs/commands/zset/zunionstore.mdx +98 -0
- package/docs/deployment.mdx +117 -0
- package/docs/developing.mdx +118 -0
- package/docs/getstarted.mdx +68 -0
- package/docs/overview.mdx +29 -0
- package/docs/pipelining/auto-pipeline.mdx +108 -0
- package/docs/pipelining/pipeline-transaction.mdx +65 -0
- package/docs/retries.mdx +24 -0
- package/docs/troubleshooting.mdx +80 -0
- package/{error-BNzLTXJG.d.mts → error-4e36-PC0.d.mts} +838 -8
- package/{error-BNzLTXJG.d.ts → error-4e36-PC0.d.ts} +838 -8
- package/fastly.d.mts +2 -2
- package/fastly.d.ts +2 -2
- package/fastly.js +557 -4
- package/fastly.mjs +1 -1
- package/nodejs.d.mts +34 -2
- package/nodejs.d.ts +34 -2
- package/nodejs.js +586 -4
- package/nodejs.mjs +30 -1
- package/package.json +16 -5
- package/src/pkg/auto-pipeline.ts +284 -0
- package/src/pkg/commands/append.ts +12 -0
- package/src/pkg/commands/arcount.ts +14 -0
- package/src/pkg/commands/ardel.ts +19 -0
- package/src/pkg/commands/ardelrange.ts +19 -0
- package/src/pkg/commands/arget.ts +17 -0
- package/src/pkg/commands/argetrange.ts +20 -0
- package/src/pkg/commands/argrep.ts +109 -0
- package/src/pkg/commands/arinfo.ts +88 -0
- package/src/pkg/commands/arinsert.ts +24 -0
- package/src/pkg/commands/arlastitems.ts +29 -0
- package/src/pkg/commands/arlen.ts +23 -0
- package/src/pkg/commands/armget.ts +18 -0
- package/src/pkg/commands/armset.ts +26 -0
- package/src/pkg/commands/arnext.ts +20 -0
- package/src/pkg/commands/arop.ts +48 -0
- package/src/pkg/commands/arring.ts +23 -0
- package/src/pkg/commands/arscan.ts +44 -0
- package/src/pkg/commands/arseek.ts +17 -0
- package/src/pkg/commands/arset.ts +20 -0
- package/src/pkg/commands/bitcount.ts +30 -0
- package/src/pkg/commands/bitfield.ts +50 -0
- package/src/pkg/commands/bitop.ts +35 -0
- package/src/pkg/commands/bitpos.ts +15 -0
- package/src/pkg/commands/client_setinfo.ts +17 -0
- package/src/pkg/commands/command.ts +142 -0
- package/src/pkg/commands/copy.ts +22 -0
- package/src/pkg/commands/dbsize.ts +12 -0
- package/src/pkg/commands/decr.ts +12 -0
- package/src/pkg/commands/decrby.ts +12 -0
- package/src/pkg/commands/del.ts +12 -0
- package/src/pkg/commands/echo.ts +12 -0
- package/src/pkg/commands/eval.ts +18 -0
- package/src/pkg/commands/evalRo.ts +18 -0
- package/src/pkg/commands/evalsha.ts +18 -0
- package/src/pkg/commands/evalshaRo.ts +18 -0
- package/src/pkg/commands/exec.ts +23 -0
- package/src/pkg/commands/exists.ts +12 -0
- package/src/pkg/commands/expire.ts +13 -0
- package/src/pkg/commands/expireat.ts +16 -0
- package/src/pkg/commands/fcall.ts +15 -0
- package/src/pkg/commands/fcall_ro.ts +18 -0
- package/src/pkg/commands/flushall.ts +15 -0
- package/src/pkg/commands/flushdb.ts +15 -0
- package/src/pkg/commands/function_delete.ts +12 -0
- package/src/pkg/commands/function_flush.ts +12 -0
- package/src/pkg/commands/function_list.ts +77 -0
- package/src/pkg/commands/function_load.ts +31 -0
- package/src/pkg/commands/function_stats.ts +42 -0
- package/src/pkg/commands/geo_add.ts +54 -0
- package/src/pkg/commands/geo_dist.ts +19 -0
- package/src/pkg/commands/geo_hash.ts +23 -0
- package/src/pkg/commands/geo_pos.ts +39 -0
- package/src/pkg/commands/geo_search.ts +140 -0
- package/src/pkg/commands/geo_search_store.ts +69 -0
- package/src/pkg/commands/get.ts +15 -0
- package/src/pkg/commands/getbit.ts +12 -0
- package/src/pkg/commands/getdel.ts +15 -0
- package/src/pkg/commands/getex.ts +36 -0
- package/src/pkg/commands/getrange.ts +15 -0
- package/src/pkg/commands/getset.ts +15 -0
- package/src/pkg/commands/hdel.ts +12 -0
- package/src/pkg/commands/hexists.ts +12 -0
- package/src/pkg/commands/hexpire.ts +30 -0
- package/src/pkg/commands/hexpireat.ts +30 -0
- package/src/pkg/commands/hexpiretime.ts +13 -0
- package/src/pkg/commands/hget.ts +18 -0
- package/src/pkg/commands/hgetall.ts +44 -0
- package/src/pkg/commands/hgetdel.ts +30 -0
- package/src/pkg/commands/hgetex.ts +56 -0
- package/src/pkg/commands/hincrby.ts +15 -0
- package/src/pkg/commands/hincrbyfloat.ts +15 -0
- package/src/pkg/commands/hkeys.ts +12 -0
- package/src/pkg/commands/hlen.ts +12 -0
- package/src/pkg/commands/hmget.ts +53 -0
- package/src/pkg/commands/hmset.ts +14 -0
- package/src/pkg/commands/hpersist.ts +13 -0
- package/src/pkg/commands/hpexpire.ts +30 -0
- package/src/pkg/commands/hpexpireat.ts +30 -0
- package/src/pkg/commands/hpexpiretime.ts +13 -0
- package/src/pkg/commands/hpttl.ts +13 -0
- package/src/pkg/commands/hrandfield.ts +52 -0
- package/src/pkg/commands/hscan.ts +31 -0
- package/src/pkg/commands/hset.ts +15 -0
- package/src/pkg/commands/hsetex.ts +59 -0
- package/src/pkg/commands/hsetnx.ts +15 -0
- package/src/pkg/commands/hstrlen.ts +12 -0
- package/src/pkg/commands/httl.ts +13 -0
- package/src/pkg/commands/hvals.ts +12 -0
- package/src/pkg/commands/incr.ts +12 -0
- package/src/pkg/commands/incrby.ts +12 -0
- package/src/pkg/commands/incrbyfloat.ts +12 -0
- package/src/pkg/commands/json_arrappend.ts +18 -0
- package/src/pkg/commands/json_arrindex.ts +15 -0
- package/src/pkg/commands/json_arrinsert.ts +18 -0
- package/src/pkg/commands/json_arrlen.ts +15 -0
- package/src/pkg/commands/json_arrpop.ts +15 -0
- package/src/pkg/commands/json_arrtrim.ts +19 -0
- package/src/pkg/commands/json_clear.ts +12 -0
- package/src/pkg/commands/json_del.ts +12 -0
- package/src/pkg/commands/json_forget.ts +12 -0
- package/src/pkg/commands/json_get.ts +45 -0
- package/src/pkg/commands/json_merge.ts +18 -0
- package/src/pkg/commands/json_mget.ts +12 -0
- package/src/pkg/commands/json_mset.ts +27 -0
- package/src/pkg/commands/json_numincrby.ts +15 -0
- package/src/pkg/commands/json_nummultby.ts +15 -0
- package/src/pkg/commands/json_objkeys.ts +15 -0
- package/src/pkg/commands/json_objlen.ts +15 -0
- package/src/pkg/commands/json_resp.ts +11 -0
- package/src/pkg/commands/json_set.ts +35 -0
- package/src/pkg/commands/json_strappend.ts +15 -0
- package/src/pkg/commands/json_strlen.ts +15 -0
- package/src/pkg/commands/json_toggle.ts +12 -0
- package/src/pkg/commands/json_type.ts +12 -0
- package/src/pkg/commands/keys.ts +12 -0
- package/src/pkg/commands/lindex.ts +11 -0
- package/src/pkg/commands/linsert.ts +10 -0
- package/src/pkg/commands/llen.ts +12 -0
- package/src/pkg/commands/lmove.ts +20 -0
- package/src/pkg/commands/lmpop.ts +19 -0
- package/src/pkg/commands/lpop.ts +18 -0
- package/src/pkg/commands/lpos.ts +26 -0
- package/src/pkg/commands/lpush.ts +12 -0
- package/src/pkg/commands/lpushx.ts +12 -0
- package/src/pkg/commands/lrange.ts +11 -0
- package/src/pkg/commands/lrem.ts +10 -0
- package/src/pkg/commands/lset.ts +8 -0
- package/src/pkg/commands/ltrim.ts +8 -0
- package/src/pkg/commands/mget.ts +15 -0
- package/src/pkg/commands/mod.ts +222 -0
- package/src/pkg/commands/mset.ts +12 -0
- package/src/pkg/commands/msetnx.ts +12 -0
- package/src/pkg/commands/persist.ts +12 -0
- package/src/pkg/commands/pexpire.ts +16 -0
- package/src/pkg/commands/pexpireat.ts +16 -0
- package/src/pkg/commands/pfadd.ts +11 -0
- package/src/pkg/commands/pfcount.ts +11 -0
- package/src/pkg/commands/pfmerge.ts +11 -0
- package/src/pkg/commands/ping.ts +15 -0
- package/src/pkg/commands/psetex.ts +14 -0
- package/src/pkg/commands/psubscribe.ts +26 -0
- package/src/pkg/commands/pttl.ts +12 -0
- package/src/pkg/commands/publish.ts +12 -0
- package/src/pkg/commands/randomkey.ts +12 -0
- package/src/pkg/commands/rename.ts +12 -0
- package/src/pkg/commands/renamenx.ts +12 -0
- package/src/pkg/commands/rpop.ts +21 -0
- package/src/pkg/commands/rpush.ts +12 -0
- package/src/pkg/commands/rpushx.ts +12 -0
- package/src/pkg/commands/sadd.ts +15 -0
- package/src/pkg/commands/scan.ts +63 -0
- package/src/pkg/commands/scard.ts +11 -0
- package/src/pkg/commands/script_exists.ts +15 -0
- package/src/pkg/commands/script_flush.ts +22 -0
- package/src/pkg/commands/script_load.ts +12 -0
- package/src/pkg/commands/sdiff.ts +11 -0
- package/src/pkg/commands/sdiffstore.ts +14 -0
- package/src/pkg/commands/search/command-builder.ts +162 -0
- package/src/pkg/commands/search/index.ts +4 -0
- package/src/pkg/commands/search/schema-builder.ts +320 -0
- package/src/pkg/commands/search/search.ts +218 -0
- package/src/pkg/commands/search/types.ts +1029 -0
- package/src/pkg/commands/search/utils.ts +275 -0
- package/src/pkg/commands/set.ts +52 -0
- package/src/pkg/commands/setbit.ts +15 -0
- package/src/pkg/commands/setex.ts +11 -0
- package/src/pkg/commands/setnx.ts +11 -0
- package/src/pkg/commands/setrange.ts +15 -0
- package/src/pkg/commands/sinter.ts +11 -0
- package/src/pkg/commands/sintercard.ts +19 -0
- package/src/pkg/commands/sinterstore.ts +14 -0
- package/src/pkg/commands/sismember.ts +11 -0
- package/src/pkg/commands/smembers.ts +12 -0
- package/src/pkg/commands/smismember.ts +17 -0
- package/src/pkg/commands/smove.ts +14 -0
- package/src/pkg/commands/spop.ts +18 -0
- package/src/pkg/commands/srandmember.ts +18 -0
- package/src/pkg/commands/srem.ts +11 -0
- package/src/pkg/commands/sscan.ts +31 -0
- package/src/pkg/commands/strlen.ts +12 -0
- package/src/pkg/commands/subscribe.ts +254 -0
- package/src/pkg/commands/sunion.ts +12 -0
- package/src/pkg/commands/sunionstore.ts +15 -0
- package/src/pkg/commands/time.ts +10 -0
- package/src/pkg/commands/touch.ts +12 -0
- package/src/pkg/commands/ttl.ts +12 -0
- package/src/pkg/commands/type.ts +13 -0
- package/src/pkg/commands/types.ts +201 -0
- package/src/pkg/commands/unlink.ts +12 -0
- package/src/pkg/commands/vector/index.ts +11 -0
- package/src/pkg/commands/vector/types.ts +63 -0
- package/src/pkg/commands/vector/utils.ts +67 -0
- package/src/pkg/commands/vector/vector.ts +131 -0
- package/src/pkg/commands/vector_add.ts +18 -0
- package/src/pkg/commands/vector_count.ts +11 -0
- package/src/pkg/commands/vector_create.ts +28 -0
- package/src/pkg/commands/vector_del.ts +13 -0
- package/src/pkg/commands/vector_drop.ts +13 -0
- package/src/pkg/commands/vector_get.ts +18 -0
- package/src/pkg/commands/vector_info.ts +25 -0
- package/src/pkg/commands/vector_query.ts +24 -0
- package/src/pkg/commands/xack.ts +16 -0
- package/src/pkg/commands/xackdel.ts +21 -0
- package/src/pkg/commands/xadd.ts +70 -0
- package/src/pkg/commands/xautoclaim.ts +31 -0
- package/src/pkg/commands/xclaim.ts +56 -0
- package/src/pkg/commands/xdel.ts +16 -0
- package/src/pkg/commands/xdelex.ts +25 -0
- package/src/pkg/commands/xgroup.ts +101 -0
- package/src/pkg/commands/xinfo.ts +28 -0
- package/src/pkg/commands/xlen.ts +12 -0
- package/src/pkg/commands/xpending.ts +44 -0
- package/src/pkg/commands/xrange.ts +49 -0
- package/src/pkg/commands/xread.ts +78 -0
- package/src/pkg/commands/xreadgroup.ts +74 -0
- package/src/pkg/commands/xrevrange.ts +48 -0
- package/src/pkg/commands/xtrim.ts +25 -0
- package/src/pkg/commands/zadd.ts +54 -0
- package/src/pkg/commands/zcard.ts +12 -0
- package/src/pkg/commands/zcount.ts +14 -0
- package/src/pkg/commands/zdiffstore.ts +15 -0
- package/src/pkg/commands/zincrby.ts +14 -0
- package/src/pkg/commands/zinterstore.ts +51 -0
- package/src/pkg/commands/zlexcount.ts +11 -0
- package/src/pkg/commands/zmscore.ts +16 -0
- package/src/pkg/commands/zpopmax.ts +18 -0
- package/src/pkg/commands/zpopmin.ts +18 -0
- package/src/pkg/commands/zrange.ts +72 -0
- package/src/pkg/commands/zrank.ts +14 -0
- package/src/pkg/commands/zrem.ts +11 -0
- package/src/pkg/commands/zremrangebylex.ts +11 -0
- package/src/pkg/commands/zremrangebyrank.ts +14 -0
- package/src/pkg/commands/zremrangebyscore.ts +18 -0
- package/src/pkg/commands/zrevrank.ts +14 -0
- package/src/pkg/commands/zscan.ts +31 -0
- package/src/pkg/commands/zscore.ts +15 -0
- package/src/pkg/commands/zunion.ts +54 -0
- package/src/pkg/commands/zunionstore.ts +52 -0
- package/src/pkg/error.ts +28 -0
- package/src/pkg/http.ts +458 -0
- package/src/pkg/index.ts +1 -0
- package/src/pkg/pipeline.ts +2041 -0
- package/src/pkg/redis.ts +2130 -0
- package/src/pkg/script.ts +100 -0
- package/src/pkg/scriptRo.ts +98 -0
- package/src/pkg/types.ts +35 -0
- package/src/pkg/util.ts +115 -0
- package/src/platforms/cloudflare.ts +162 -0
- package/src/platforms/fastly.ts +105 -0
- package/src/platforms/nodejs.ts +231 -0
- package/src/version.ts +1 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: JSON.ARRINDEX
|
|
3
|
+
description: Search for the first occurrence of a JSON value in an array.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Arguments
|
|
7
|
+
|
|
8
|
+
<ParamField body="key" type="string" required>
|
|
9
|
+
The key of the json entry.
|
|
10
|
+
</ParamField>
|
|
11
|
+
<ParamField body="path" type="string" required>
|
|
12
|
+
The path of the array. `$` is the root.
|
|
13
|
+
</ParamField>
|
|
14
|
+
|
|
15
|
+
<ParamField body="value" type="TValue" required>
|
|
16
|
+
The value to search for.
|
|
17
|
+
</ParamField>
|
|
18
|
+
|
|
19
|
+
<ParamField body="start" type="integer" default={0}>
|
|
20
|
+
The start index.
|
|
21
|
+
</ParamField>
|
|
22
|
+
<ParamField body="stop" type="integer" default={0}>
|
|
23
|
+
The stop index.
|
|
24
|
+
</ParamField>
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## Response
|
|
28
|
+
|
|
29
|
+
<ResponseField type="integer[]" required>
|
|
30
|
+
The index of the first occurrence of the value in the array, or -1 if not found.
|
|
31
|
+
</ResponseField>
|
|
32
|
+
|
|
33
|
+
<RequestExample>
|
|
34
|
+
```ts Example
|
|
35
|
+
const index = await redis.json.arrindex("key", "$.path.to.array", "a");
|
|
36
|
+
```
|
|
37
|
+
</RequestExample>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: JSON.ARRINSERT
|
|
3
|
+
description: Insert the json values into the array at path before the index (shifts to the right).
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Arguments
|
|
7
|
+
|
|
8
|
+
<ParamField body="key" type="string" required>
|
|
9
|
+
The key of the json entry.
|
|
10
|
+
</ParamField>
|
|
11
|
+
<ParamField body="path" type="string" required>
|
|
12
|
+
The path of the array. `$` is the root.
|
|
13
|
+
</ParamField>
|
|
14
|
+
|
|
15
|
+
<ParamField body="index" type="integer" required>
|
|
16
|
+
The index where to insert the values.
|
|
17
|
+
</ParamField>
|
|
18
|
+
|
|
19
|
+
<ParamField body="values" type="...TValue[]" required>
|
|
20
|
+
One or more values to append to the array.
|
|
21
|
+
</ParamField>
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## Response
|
|
25
|
+
|
|
26
|
+
<ResponseField type="integer[]" required>
|
|
27
|
+
The length of the array after the insertion.
|
|
28
|
+
</ResponseField>
|
|
29
|
+
|
|
30
|
+
<RequestExample>
|
|
31
|
+
```ts Example
|
|
32
|
+
const length = await redis.json.arrinsert("key", "$.path.to.array", 2, "a", "b");
|
|
33
|
+
```
|
|
34
|
+
</RequestExample>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: JSON.ARRLEN
|
|
3
|
+
description: Report the length of the JSON array at `path` in `key`.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Arguments
|
|
7
|
+
|
|
8
|
+
<ParamField body="key" type="string" required>
|
|
9
|
+
The key of the json entry.
|
|
10
|
+
</ParamField>
|
|
11
|
+
<ParamField body="path" type="string" required>
|
|
12
|
+
The path of the array. `$` is the root.
|
|
13
|
+
</ParamField>
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## Response
|
|
17
|
+
|
|
18
|
+
<ResponseField type="integer[]" required>
|
|
19
|
+
The length of the array.
|
|
20
|
+
</ResponseField>
|
|
21
|
+
|
|
22
|
+
<RequestExample>
|
|
23
|
+
```ts Example
|
|
24
|
+
const length = await redis.json.arrlen("key", "$.path.to.array");
|
|
25
|
+
```
|
|
26
|
+
</RequestExample>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: JSON.ARRPOP
|
|
3
|
+
description: Remove and return an element from the index in the array. By default the last element from an array is popped.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Arguments
|
|
7
|
+
|
|
8
|
+
<ParamField body="key" type="string" required>
|
|
9
|
+
The key of the json entry.
|
|
10
|
+
</ParamField>
|
|
11
|
+
<ParamField body="path" type="string">
|
|
12
|
+
The path of the array.
|
|
13
|
+
</ParamField>
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
<ParamField body="index" type="number" default={-1}>
|
|
18
|
+
The index of the element to pop.
|
|
19
|
+
</ParamField>
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## Response
|
|
23
|
+
|
|
24
|
+
<ResponseField type="(TValue | null)[]" required>
|
|
25
|
+
The popped element or null if the array is empty.
|
|
26
|
+
</ResponseField>
|
|
27
|
+
|
|
28
|
+
<RequestExample>
|
|
29
|
+
```ts Example
|
|
30
|
+
const element = await redis.json.arrpop("key", "$.path.to.array");
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
```ts First
|
|
34
|
+
const firstElement = await redis.json.arrpop("key", "$.path.to.array", 0);
|
|
35
|
+
```
|
|
36
|
+
</RequestExample>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: JSON.ARRTRIM
|
|
3
|
+
description: Trim an array so that it contains only the specified inclusive range of elements.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Arguments
|
|
7
|
+
|
|
8
|
+
<ParamField body="key" type="string" required>
|
|
9
|
+
The key of the json entry.
|
|
10
|
+
</ParamField>
|
|
11
|
+
<ParamField body="path" type="string" required>
|
|
12
|
+
The path of the array. `$` is the root.
|
|
13
|
+
</ParamField>
|
|
14
|
+
|
|
15
|
+
<ParamField body="start" type="integer" required>
|
|
16
|
+
The start index of the range.
|
|
17
|
+
</ParamField>
|
|
18
|
+
<ParamField body="stop" type="integer" required>
|
|
19
|
+
The stop index of the range.
|
|
20
|
+
</ParamField>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## Response
|
|
25
|
+
|
|
26
|
+
<ResponseField type="integer[]" required>
|
|
27
|
+
The length of the array after the trimming.
|
|
28
|
+
</ResponseField>
|
|
29
|
+
|
|
30
|
+
<RequestExample>
|
|
31
|
+
```ts Example
|
|
32
|
+
const length = await redis.json.arrtrim("key", "$.path.to.array", 2, 10);
|
|
33
|
+
```
|
|
34
|
+
</RequestExample>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: JSON.CLEAR
|
|
3
|
+
description: Clear container values (arrays/objects) and set numeric values to 0.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Arguments
|
|
7
|
+
|
|
8
|
+
<ParamField body="key" type="string" required>
|
|
9
|
+
The key of the json entry.
|
|
10
|
+
</ParamField>
|
|
11
|
+
<ParamField body="path" type="string" required>
|
|
12
|
+
The path to clear. `$` is the root.
|
|
13
|
+
</ParamField>
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## Response
|
|
18
|
+
|
|
19
|
+
<ResponseField type="integer[]" required>
|
|
20
|
+
How many values were cleared.
|
|
21
|
+
</ResponseField>
|
|
22
|
+
|
|
23
|
+
<RequestExample>
|
|
24
|
+
```ts Example
|
|
25
|
+
await redis.json.clear("key");
|
|
26
|
+
```
|
|
27
|
+
```ts With path
|
|
28
|
+
await redis.json.clear("key", "$.my.key");
|
|
29
|
+
```
|
|
30
|
+
</RequestExample>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: JSON.DEL
|
|
3
|
+
description: Delete a key from a JSON document.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Arguments
|
|
7
|
+
|
|
8
|
+
<ParamField body="key" type="string" required>
|
|
9
|
+
The key of the json entry.
|
|
10
|
+
</ParamField>
|
|
11
|
+
<ParamField body="path" type="string" required>
|
|
12
|
+
The path to delete. `$` is the root.
|
|
13
|
+
</ParamField>
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## Response
|
|
17
|
+
|
|
18
|
+
<ResponseField type="integer" required>
|
|
19
|
+
How many paths were deleted.
|
|
20
|
+
</ResponseField>
|
|
21
|
+
|
|
22
|
+
<RequestExample>
|
|
23
|
+
```ts Example
|
|
24
|
+
await redis.json.del("key", "$.path.to.value");
|
|
25
|
+
```
|
|
26
|
+
</RequestExample>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: JSON.FORGET
|
|
3
|
+
description: Delete a key from a JSON document.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Arguments
|
|
7
|
+
|
|
8
|
+
<ParamField body="key" type="string" required>
|
|
9
|
+
The key of the json entry.
|
|
10
|
+
</ParamField>
|
|
11
|
+
<ParamField body="path" type="string" required>
|
|
12
|
+
The path to forget. `$` is the root.
|
|
13
|
+
</ParamField>
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## Response
|
|
17
|
+
|
|
18
|
+
<ResponseField type="integer" required>
|
|
19
|
+
How many paths were deleted.
|
|
20
|
+
</ResponseField>
|
|
21
|
+
|
|
22
|
+
<RequestExample>
|
|
23
|
+
```ts Example
|
|
24
|
+
await redis.json.forget("key", "$.path.to.value");
|
|
25
|
+
```
|
|
26
|
+
</RequestExample>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: JSON.GET
|
|
3
|
+
description: Get a single value from a JSON document.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Arguments
|
|
7
|
+
|
|
8
|
+
<ParamField body="key" type="string" required>
|
|
9
|
+
The key of the json entry.
|
|
10
|
+
</ParamField>
|
|
11
|
+
|
|
12
|
+
<ParamField body="options">
|
|
13
|
+
<Expandable>
|
|
14
|
+
<ParamField body="indent" type="string">
|
|
15
|
+
Sets the indentation string for nested levels.
|
|
16
|
+
</ParamField>
|
|
17
|
+
|
|
18
|
+
<ParamField body="newline" type="string">
|
|
19
|
+
Sets the string that's printed at the end of each line.
|
|
20
|
+
</ParamField>
|
|
21
|
+
|
|
22
|
+
<ParamField body="space" type="string">
|
|
23
|
+
Sets the string that is put between a key and a value.
|
|
24
|
+
</ParamField>
|
|
25
|
+
|
|
26
|
+
</Expandable>
|
|
27
|
+
|
|
28
|
+
</ParamField>
|
|
29
|
+
|
|
30
|
+
<ParamField body="paths" type="...string[]" required>
|
|
31
|
+
One or more paths to retrieve from the JSON document. `$` is the root.
|
|
32
|
+
</ParamField>
|
|
33
|
+
|
|
34
|
+
## Response
|
|
35
|
+
|
|
36
|
+
<ResponseField type="(TValue | null)[]" required>
|
|
37
|
+
The value at the specified path or `null` if the path does not exist.
|
|
38
|
+
</ResponseField>
|
|
39
|
+
|
|
40
|
+
<RequestExample>
|
|
41
|
+
```ts Example
|
|
42
|
+
const value = await redis.json.get("key", "$.path.to.somewhere");
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
```ts With Options
|
|
46
|
+
const value = await redis.json.get("key", {
|
|
47
|
+
indent: " ",
|
|
48
|
+
newline: "\n",
|
|
49
|
+
space: " ",
|
|
50
|
+
}, "$.path.to.somewhere");
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
</RequestExample>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: JSON.MERGE
|
|
3
|
+
description: Merges the JSON value at path in key with the provided value.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Arguments
|
|
7
|
+
|
|
8
|
+
<ParamField body="key" type="str" required>
|
|
9
|
+
The key of the json entry.
|
|
10
|
+
</ParamField>
|
|
11
|
+
|
|
12
|
+
<ParamField body="path" type="str" required>
|
|
13
|
+
The path of the value to set.
|
|
14
|
+
</ParamField>
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
<ParamField body="value" type="string | number | Record<string, unknown> | Array<unknown>" required>
|
|
18
|
+
The value to merge with.
|
|
19
|
+
</ParamField>
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## Response
|
|
23
|
+
|
|
24
|
+
<ResponseField type="string" required>
|
|
25
|
+
Returns "OK" if the merge was successful.
|
|
26
|
+
</ResponseField>
|
|
27
|
+
|
|
28
|
+
<RequestExample>
|
|
29
|
+
```ts Example
|
|
30
|
+
await redis.json.merge("key", "$.path.to.value", {"new": "value"})
|
|
31
|
+
```
|
|
32
|
+
</RequestExample>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: JSON.MGET
|
|
3
|
+
description: Get the same path from multiple JSON documents.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Arguments
|
|
7
|
+
|
|
8
|
+
<ParamField body="keys" type="...string[]" required>
|
|
9
|
+
One or more keys of JSON documents.
|
|
10
|
+
</ParamField>
|
|
11
|
+
|
|
12
|
+
<ParamField body="path" type="string" required>
|
|
13
|
+
The path to get from the JSON document. `$` is the root.
|
|
14
|
+
</ParamField>
|
|
15
|
+
|
|
16
|
+
## Response
|
|
17
|
+
|
|
18
|
+
<ResponseField type="TValue[]" required>
|
|
19
|
+
The values at the specified path or `null` if the path does not exist.
|
|
20
|
+
</ResponseField>
|
|
21
|
+
|
|
22
|
+
<RequestExample>
|
|
23
|
+
```ts Example
|
|
24
|
+
const values = await redis.json.mget(["key1", "key2"], "$.path.to.somewhere");
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
</RequestExample>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: JSON.MSET
|
|
3
|
+
description: Sets multiple JSON values at multiple paths in multiple keys.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Arguments
|
|
7
|
+
|
|
8
|
+
<ParamField body="params" type="{ key: string, path: string, value: TData }[]" required>
|
|
9
|
+
A list of objects where each tuple contains a key, a path, and a value.
|
|
10
|
+
Type of value (`TData`) can be `Array<number>`, `string`, `boolean`, `Record<string, any>`, or `Array<any>`.
|
|
11
|
+
</ParamField>
|
|
12
|
+
|
|
13
|
+
## Response
|
|
14
|
+
|
|
15
|
+
<ResponseField type="string" required>
|
|
16
|
+
Returns "OK" if the command was successful.
|
|
17
|
+
</ResponseField>
|
|
18
|
+
|
|
19
|
+
<RequestExample>
|
|
20
|
+
```py Example
|
|
21
|
+
await redis.json.mset([
|
|
22
|
+
{ key: key, path: "$.path", value: value},
|
|
23
|
+
{ key: key2, path: "$.path2", value: value2}
|
|
24
|
+
])
|
|
25
|
+
```
|
|
26
|
+
</RequestExample>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: JSON.NUMINCRBY
|
|
3
|
+
description: Increment the number value stored at `path` by number.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Arguments
|
|
7
|
+
|
|
8
|
+
<ParamField body="key" type="string" required>
|
|
9
|
+
The key of the json entry.
|
|
10
|
+
</ParamField>
|
|
11
|
+
<ParamField body="path" type="string" required>
|
|
12
|
+
The path of the array. `$` is the root.
|
|
13
|
+
</ParamField>
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
<ParamField body="increment" type="number" required>
|
|
19
|
+
The number to increment by.
|
|
20
|
+
</ParamField>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## Response
|
|
24
|
+
|
|
25
|
+
<ResponseField type="integer[]" required>
|
|
26
|
+
The new value after incrementing
|
|
27
|
+
</ResponseField>
|
|
28
|
+
|
|
29
|
+
<RequestExample>
|
|
30
|
+
```ts Example
|
|
31
|
+
const newValue = await redis.json.numincrby("key", "$.path.to.value", 2);
|
|
32
|
+
```
|
|
33
|
+
</RequestExample>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: JSON.NUMMULTBY
|
|
3
|
+
description: Multiply the number value stored at `path` by number.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Arguments
|
|
7
|
+
|
|
8
|
+
<ParamField body="key" type="string" required>
|
|
9
|
+
The key of the json entry.
|
|
10
|
+
</ParamField>
|
|
11
|
+
<ParamField body="path" type="string" required>
|
|
12
|
+
The path of the array. `$` is the root.
|
|
13
|
+
</ParamField>
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
<ParamField body="multiply" type="number" required>
|
|
19
|
+
The number to multiply by.
|
|
20
|
+
</ParamField>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## Response
|
|
24
|
+
|
|
25
|
+
<ResponseField type="integer[]" required>
|
|
26
|
+
The new value after multiplying
|
|
27
|
+
</ResponseField>
|
|
28
|
+
|
|
29
|
+
<RequestExample>
|
|
30
|
+
```ts Example
|
|
31
|
+
const newValue = await redis.json.nummultby("key", "$.path.to.value", 2);
|
|
32
|
+
```
|
|
33
|
+
</RequestExample>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: JSON.OBJKEYS
|
|
3
|
+
description: Return the keys in the object that`s referenced by path.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Arguments
|
|
7
|
+
|
|
8
|
+
<ParamField body="key" type="string" required>
|
|
9
|
+
The key of the json entry.
|
|
10
|
+
</ParamField>
|
|
11
|
+
<ParamField body="path" type="string" required>
|
|
12
|
+
The path of the array. `$` is the root.
|
|
13
|
+
</ParamField>
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## Response
|
|
18
|
+
|
|
19
|
+
<ResponseField type="string[][]" required>
|
|
20
|
+
The keys of the object at the path.
|
|
21
|
+
</ResponseField>
|
|
22
|
+
|
|
23
|
+
<RequestExample>
|
|
24
|
+
```ts Example
|
|
25
|
+
const keys = await redis.json.objkeys("key", "$.path");
|
|
26
|
+
```
|
|
27
|
+
</RequestExample>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: JSON.OBJLEN
|
|
3
|
+
description: Report the number of keys in the JSON object at `path` in `key`.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Arguments
|
|
7
|
+
|
|
8
|
+
<ParamField body="key" type="string" required>
|
|
9
|
+
The key of the json entry.
|
|
10
|
+
</ParamField>
|
|
11
|
+
<ParamField body="path" type="string" required>
|
|
12
|
+
The path of the object. `$` is the root.
|
|
13
|
+
</ParamField>
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## Response
|
|
18
|
+
|
|
19
|
+
<ResponseField type="integer[]" required>
|
|
20
|
+
The number of keys in the objects.
|
|
21
|
+
</ResponseField>
|
|
22
|
+
|
|
23
|
+
<RequestExample>
|
|
24
|
+
```ts Example
|
|
25
|
+
const lengths = await redis.json.objlen("key", "$.path");
|
|
26
|
+
```
|
|
27
|
+
</RequestExample>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: JSON.SET
|
|
3
|
+
description: Set the JSON value at path in key.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Arguments
|
|
7
|
+
|
|
8
|
+
<ParamField body="key" type="string" required>
|
|
9
|
+
The key of the json entry.
|
|
10
|
+
</ParamField>
|
|
11
|
+
<ParamField body="path" type="string" required>
|
|
12
|
+
The path of the value to set. `$` is the root.
|
|
13
|
+
</ParamField>
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
<ParamField body="value" type="TValue" required>
|
|
18
|
+
The value to set.
|
|
19
|
+
</ParamField>
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## Response
|
|
23
|
+
|
|
24
|
+
<ResponseField type="OK" required>
|
|
25
|
+
`OK`
|
|
26
|
+
</ResponseField>
|
|
27
|
+
|
|
28
|
+
<RequestExample>
|
|
29
|
+
```ts Example
|
|
30
|
+
Set the JSON value at path in key.
|
|
31
|
+
redis.json.set(key, "$.path", value);
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
```ts NX
|
|
35
|
+
const value = ...
|
|
36
|
+
redis.json.set(key, "$.path", value, { nx:true });
|
|
37
|
+
```
|
|
38
|
+
```ts XX
|
|
39
|
+
const value = ...
|
|
40
|
+
redis.json.set(key, "$.path", value, { xx:true });
|
|
41
|
+
```
|
|
42
|
+
</RequestExample>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: JSON.STRAPPEND
|
|
3
|
+
description: Append the json-string values to the string at path.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Arguments
|
|
7
|
+
|
|
8
|
+
<ParamField body="key" type="string" required>
|
|
9
|
+
The key of the json entry.
|
|
10
|
+
</ParamField>
|
|
11
|
+
<ParamField body="path" type="string" required>
|
|
12
|
+
The path of the value. `$` is the root.
|
|
13
|
+
</ParamField>
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
<ParamField body="value" type="string" required>
|
|
18
|
+
The value to append to the existing string.
|
|
19
|
+
</ParamField>
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## Response
|
|
23
|
+
|
|
24
|
+
<ResponseField type="integer[]" required>
|
|
25
|
+
The length of the array after the appending.
|
|
26
|
+
</ResponseField>
|
|
27
|
+
|
|
28
|
+
<RequestExample>
|
|
29
|
+
```ts Example
|
|
30
|
+
await redis.json.strappend("key", "$.path.to.str", "abc");
|
|
31
|
+
```
|
|
32
|
+
</RequestExample>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: JSON.STRLEN
|
|
3
|
+
description: Report the length of the JSON String at path in key
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
## Arguments
|
|
8
|
+
|
|
9
|
+
<ParamField body="key" type="string" required>
|
|
10
|
+
The key of the json entry.
|
|
11
|
+
</ParamField>
|
|
12
|
+
<ParamField body="path" type="string" required>
|
|
13
|
+
The path of the array. `$` is the root.
|
|
14
|
+
</ParamField>
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## Response
|
|
18
|
+
<ResponseField type="array" required>
|
|
19
|
+
JSON.STRLEN returns by recursive descent an array of integer replies for each path, the array's length, or nil, if the matching JSON value is not a string.
|
|
20
|
+
</ResponseField>
|
|
21
|
+
|
|
22
|
+
<RequestExample>
|
|
23
|
+
```ts Example
|
|
24
|
+
await redis.json.strlen("key", "$.path.to.str", "a");
|
|
25
|
+
```
|
|
26
|
+
</RequestExample>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: JSON.TOGGLE
|
|
3
|
+
description: Toggle a boolean value stored at `path`.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Arguments
|
|
7
|
+
|
|
8
|
+
<ParamField body="key" type="string" required>
|
|
9
|
+
The key of the json entry.
|
|
10
|
+
</ParamField>
|
|
11
|
+
<ParamField body="path" type="string" required>
|
|
12
|
+
The path of the boolean. `$` is the root.
|
|
13
|
+
</ParamField>
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## Response
|
|
19
|
+
|
|
20
|
+
<ResponseField type="boolean" required>
|
|
21
|
+
The new value of the boolean.
|
|
22
|
+
</ResponseField>
|
|
23
|
+
|
|
24
|
+
<RequestExample>
|
|
25
|
+
```ts Example
|
|
26
|
+
const bool = await redis.json.toggle("key", "$.path.to.bool");
|
|
27
|
+
```
|
|
28
|
+
</RequestExample>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: JSON.TYPE
|
|
3
|
+
description: Report the type of JSON value at `path`.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Arguments
|
|
7
|
+
|
|
8
|
+
<ParamField body="key" type="string" required>
|
|
9
|
+
The key of the json entry.
|
|
10
|
+
</ParamField>
|
|
11
|
+
<ParamField body="path" type="string" required>
|
|
12
|
+
The path of the value. `$` is the root.
|
|
13
|
+
</ParamField>
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## Response
|
|
19
|
+
|
|
20
|
+
<ResponseField type="(string | null)[]" required>
|
|
21
|
+
The type of the value at `path` or `null` if the value does not exist.
|
|
22
|
+
</ResponseField>
|
|
23
|
+
|
|
24
|
+
<RequestExample>
|
|
25
|
+
```ts Example
|
|
26
|
+
const myType = await redis.json.type("key", "$.path.to.value");
|
|
27
|
+
```
|
|
28
|
+
</RequestExample>
|