Redis底層類型之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)試等提供了完整的開發(fā)人員體驗(yàn)。
Redis Stack 將以下功能捆綁到 Redis 中:JSON、搜索和查詢、時(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 開發(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è)包包含開發(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底層類型之json命令使用的詳細(xì)內(nèi)容,更多關(guān)于Redis底層類型json的資料請關(guān)注腳本之家其它相關(guān)文章!
相關(guān)文章
redis中RDB(Redis Data Base)的機(jī)制
本文主要介紹了redis中RDB(Redis Data Base)的機(jī)制,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2023-04-04
Redis?Lua腳本實(shí)現(xiàn)ip限流示例
這篇文章主要介紹了Redis?Lua腳本實(shí)現(xiàn)ip限流示例詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪2022-07-07
Redis在項(xiàng)目中常見的12種使用場景示例和說明
Redis是一個(gè)開源的高性能鍵值對數(shù)據(jù)庫,它以其內(nèi)存中數(shù)據(jù)存儲(chǔ)、鍵過期策略、持久化、事務(wù)、豐富的數(shù)據(jù)類型支持以及原子操作等特性,在許多項(xiàng)目中扮演著關(guān)鍵角色,以下是整理的12個(gè)Redis在項(xiàng)目中常見的使用場景舉例說明和解釋2024-06-06

