Redis底層類(lèi)型之json命令使用
關(guān)于redisjson
The JSON capability of Redis Stack provides JavaScript Object Notation (JSON) support for Redis. 可以看到redis json是輸入RedisStack的一部分。
那么RedisStack又是什么呢?
Redis Stack is the best starting point for working with Redis. We've bundled together the best of the technology that we have to offer into an easy-to-use package. Redis Stack extends the core features of Redis OSS and provides a complete developer experience for debugging and more.
RedisStack 是使用 Redis 的最佳起點(diǎn)。我們已經(jīng)把我們必須提供的最好的技術(shù)捆綁在一起,形成一個(gè)易于使用的軟件包。Redis Stack 擴(kuò)展了 Redis OSS 的核心特性,并為調(diào)試等提供了完整的開(kāi)發(fā)人員體驗(yàn)。
Redis Stack 將以下功能捆綁到 Redis 中:JSON、搜索和查詢(xún)、時(shí)間序列和概率性。
Redis Stack packaging
There are two distinct Redis Stack packages to choose from:
有兩種不同的 Redis Stack 包可供選擇:
Redis Stack Server: This package contains Redis OSS and module extensions only. It does not contain RedisInsight, the developer desktop application. This package is best for production deployment and is intended to be a drop-in replacement (for example, if you're already deploying Redis OSS as a cache). You can still download RedisInsight separately.
Redis Stack Server:該包僅包含 Redis OSS 和模塊擴(kuò)展。它不包含 RedisInsight 開(kāi)發(fā)人員桌面應(yīng)用程序。這個(gè)包最適合生產(chǎn)部署,并旨在作為替代品(例如,如果您已經(jīng)將 Redis OSS 部署為緩存)。您仍然可以單獨(dú)下載 RedisInsight。
Redis Stack: This package contains everything a developer needs in a single bundle. This includes Redis Stack Server (Redis OSS and module extensions) along with the RedisInsight desktop application (or part of the docker container). If you want to create an application locally and explore how it interacts with Redis, this is the package for you.
Redis Stack:這個(gè)包包含開(kāi)發(fā)人員在一個(gè)單獨(dú)的捆綁包中所需的一切。這包括 Redis Stack Server(Redis OSS 和模塊擴(kuò)展)以及 RedisInsight 桌面應(yīng)用程序(或 Docker 容器的一部分)。如果您想在本地創(chuàng)建一個(gè)應(yīng)用程序并探索它與 Redis 的交互方式,這個(gè)包適合您。
如何安裝redis-statck
version: "3.7" services: redis: image: redis/redis-stack-server:latest container_name: redisstack hostname: redisstack restart: always ports: - "16379:6379" volumes: # - ./conf/redis.conf:/usr/local/etc/redis/redis.conf - ./data:/data - ./logs:/logs command: redis-stack-server --requirepass aimore@123456 networks: - default networks: default: external: name: aimore
命令
- JSON.SET
JSON.SET key path value [NX | XX] JSON.SET doc $ '{"a":2}' JSON.SET doc $.a '3'
JSET.SET returns a simple string reply: OK if executed correctly or nil if the specified NX or XX conditions were not met.
- JSON.GET
JSON.GET key [INDENT indent] [NEWLINE newline] [SPACE space] [path [path ...]]
Return the value at path in JSON serialized form
- JSON.DEL
JSON.DEL key [path]
以上就是Redis底層類(lèi)型之json命令使用的詳細(xì)內(nèi)容,更多關(guān)于Redis底層類(lèi)型json的資料請(qǐng)關(guān)注腳本之家其它相關(guān)文章!
相關(guān)文章
淺談redis的過(guò)期時(shí)間設(shè)置和過(guò)期刪除機(jī)制
本文主要介紹了redis的過(guò)期時(shí)間設(shè)置和過(guò)期刪除機(jī)制,文中通過(guò)示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2022-03-03Redis的數(shù)據(jù)過(guò)期清除策略實(shí)現(xiàn)
Redis實(shí)現(xiàn)了數(shù)據(jù)過(guò)期清除策略,本文將深入解析Redis的數(shù)據(jù)過(guò)期清除策略,包括過(guò)期鍵的刪除方式、清除策略的選擇以及相關(guān)配置參數(shù)的介紹,感興趣的可以了解一下2024-05-05Redis實(shí)現(xiàn)延遲任務(wù)的常見(jiàn)方案詳解
延遲任務(wù)(Delayed?Task)是指在未來(lái)的某個(gè)時(shí)間點(diǎn),執(zhí)行相應(yīng)的任務(wù),本文為大家整理了Redis實(shí)現(xiàn)延遲任務(wù)的幾個(gè)常見(jiàn)方案,希望對(duì)大家有所幫助2024-04-04Redisson之lock()和tryLock()的區(qū)別及說(shuō)明
這篇文章主要介紹了Redisson之lock()和tryLock()的區(qū)別及說(shuō)明,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2023-12-12Redis 對(duì)比 Memcached 并在 CentOS 下進(jìn)行安裝配置詳解
Redis 是一個(gè)開(kāi)源、支持網(wǎng)絡(luò)、基于內(nèi)存、鍵值對(duì)的 Key-Value 數(shù)據(jù)庫(kù),本篇文章主要介紹了Redis 對(duì)比 Memcached 并在 CentOS 下進(jìn)行安裝配置詳解,有興趣的可以了解一下。2016-11-11redis中事務(wù)機(jī)制及樂(lè)觀鎖的實(shí)現(xiàn)
這篇文章主要介紹了redis中事務(wù)機(jī)制及樂(lè)觀鎖的相關(guān)內(nèi)容,通過(guò)事務(wù)的執(zhí)行分析Redis樂(lè)觀鎖,具有一定參考價(jià)值,需要的朋友可以了解下。2017-10-10