Skip to content

Commit 5af0297

Browse files
authored
Update Redis 7.0 commands help (#85)
1 parent 3601b52 commit 5af0297

File tree

3 files changed

+29
-20
lines changed

3 files changed

+29
-20
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
- Add CLI commands for Redis 7.0.0 (#80)
1010
- Update to Grafana 8.1.4 (#81)
1111
- Add new command for Redis 6.2, Redis 7.0 (#82)
12+
- Add demo at https://demo.volkovlabs.io (#83)
13+
- Update Redis 7.0 commands help
1214

1315
## 2.0.1 (2021-07-07)
1416

README.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,6 @@
1010
[![codecov](https://codecov.io/gh/RedisGrafana/grafana-redis-app/branch/master/graph/badge.svg?token=15SIRGU8SX)](https://codecov.io/gh/RedisGrafana/grafana-redis-app)
1111
[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/RedisGrafana/grafana-redis-app.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/RedisGrafana/grafana-redis-app/context:javascript)
1212

13-
## Summary
14-
15-
- [**Introduction**](#introduction)
16-
- [**Getting Started**](#getting-started)
17-
- [**Documentation**](#documentation)
18-
- [**Development**](#development)
19-
- [**Feedback**](#feedback)
20-
- [**Contributing**](#contributing)
21-
- [**License**](#license)
22-
2313
## Introduction
2414

2515
The Redis Application is a plugin for Grafana that provides application pages, custom panels, and dashboards for [Redis Data Source](https://grafana.com/grafana/plugins/redis-datasource).

src/redis-cli-panel/help/redis.ts

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,10 @@ export const RedisHelp: { [key: string]: HelpCommand } = {
132132
url: 'https://redis.io/commands/bgsave',
133133
},
134134
BITCOUNT: {
135-
syntax: 'BITCOUNT key [start end]',
136-
summary: 'Count set bits in a string.',
135+
syntax: 'BITCOUNT key [start end [BYTE|BIT]]',
136+
summary: 'Count the number of set bits (population counting) in a string.',
137137
complexity: 'O(N)',
138-
since: '2.6.0',
138+
since: '2.6.0, >= 7.0: Added the BYTE|BIT option.',
139139
url: 'https://redis.io/commands/bitcount',
140140
},
141141
BITFIELD: {
@@ -161,10 +161,10 @@ export const RedisHelp: { [key: string]: HelpCommand } = {
161161
url: 'https://redis.io/commands/bitop',
162162
},
163163
BITPOS: {
164-
syntax: 'BITPOS key bit [start] [end]',
165-
summary: 'Find first bit set or clear in a string.',
164+
syntax: 'BITPOS key bit [start [end [BYTE|BIT]]]',
165+
summary: 'Return the position of the first bit set to 1 or 0 in a string.',
166166
complexity: 'O(N)',
167-
since: '2.8.7',
167+
since: '2.8.7, >= 7.0: Added the BYTE|BIT option.',
168168
url: 'https://redis.io/commands/bitpos',
169169
},
170170
BLPOP: {
@@ -1032,14 +1032,14 @@ export const RedisHelp: { [key: string]: HelpCommand } = {
10321032
url: 'https://redis.io/commands/lpop',
10331033
},
10341034
LMPOP: {
1035-
syntax: 'LMPOP numkeys [key [key ...]] LEFT|RIGHT [COUNT count]',
1035+
syntax: 'LMPOP numkeys key [key ...] LEFT|RIGHT [COUNT count]',
10361036
summary: 'Pop elements from a list.',
10371037
complexity: 'O(N+M) where N is the number of provided keys and M is the number of elements returned.',
10381038
since: '7.0.0',
10391039
url: 'https://redis.io/commands/lmpop',
10401040
},
10411041
BLMPOP: {
1042-
syntax: 'BLMPOP timeout numkeys [key [key ...]] LEFT|RIGHT [COUNT count]',
1042+
syntax: 'BLMPOP timeout numkeys key [key ...] LEFT|RIGHT [COUNT count]',
10431043
summary: 'Pop elements from a list, or block until one is available.',
10441044
complexity: 'O(N+M) where N is the number of provided keys and M is the number of elements returned.',
10451045
since: '7.0.0',
@@ -1463,7 +1463,7 @@ export const RedisHelp: { [key: string]: HelpCommand } = {
14631463
url: 'https://redis.io/commands/scard',
14641464
},
14651465
SINTERCARD: {
1466-
syntax: 'SINTERCARD key [key ...]',
1466+
syntax: 'SINTERCARD numkeys key [key ...] [LIMIT limit]',
14671467
summary: 'Returns the cardinality of the set which would result from the intersection of all the given sets.',
14681468
complexity: 'O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.',
14691469
since: '7.0.0',
@@ -1822,7 +1822,7 @@ export const RedisHelp: { [key: string]: HelpCommand } = {
18221822
url: 'https://redis.io/commands/zcard',
18231823
},
18241824
ZINTERCARD: {
1825-
syntax: 'ZINTERCARD numkeys key [key ...]',
1825+
syntax: 'ZINTERCARD numkeys key [key ...] [LIMIT limit]',
18261826
summary:
18271827
'This command is similar to ZINTER, but instead of returning the result set, it returns just the cardinality of the result.',
18281828
complexity:
@@ -2317,4 +2317,21 @@ export const RedisHelp: { [key: string]: HelpCommand } = {
23172317
since: '7.0.0',
23182318
url: 'https://redis.io/commands/evalsha_ro',
23192319
},
2320+
ZMPOP: {
2321+
syntax: 'ZMPOP numkeys key [key ...] MIN|MAX [COUNT count]',
2322+
summary:
2323+
'Pops one or more elements, that are member-score pairs, from the first non-empty sorted set in the provided list of key names.',
2324+
since: '7.0.0',
2325+
complexity:
2326+
'O(K) + O(N*log(M)) where K is the number of provided keys, N being the number of elements in the sorted set, and M being the number of elements popped.',
2327+
url: 'https://redis.io/commands/zmpop',
2328+
},
2329+
BZMPOP: {
2330+
syntax: 'BZMPOP timeout numkeys key [key ...] MIN|MAX [COUNT count]',
2331+
summary: 'BZMPOP is the blocking variant of ZMPOP.',
2332+
since: '7.0.0',
2333+
complexity:
2334+
'O(K) + O(N*log(M)) where K is the number of provided keys, N being the number of elements in the sorted set, and M being the number of elements popped.',
2335+
url: 'https://redis.io/commands/bzmpop',
2336+
},
23202337
};

0 commit comments

Comments
 (0)