Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion build/add_cmds.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ def generate_command_frontmatter(command_name: str, command_data: dict, all_comm
'title': full_command_name,
'linkTitle': full_command_name,
'description': command_data.get('summary'),
'syntax_str': str(c),
'syntax_fmt': c.syntax(),
'hidden': False # Default to not hidden
})
Expand Down
35 changes: 30 additions & 5 deletions build/update_cmds.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/env python3
import argparse
import glob
import json
import logging
import os
import glob

from components.syntax import Command
from components.markdown import Markdown
from components.syntax import Command


def parse_args() -> argparse.Namespace:
Expand All @@ -21,6 +21,7 @@ def parse_args() -> argparse.Namespace:
help='Directory to save railroad diagram SVG files')
return parser.parse_args()


def generate_railroad_diagrams(commands_data: dict, output_dir: str) -> None:
"""Generate railroad diagrams for all commands."""
try:
Expand Down Expand Up @@ -63,10 +64,35 @@ def generate_railroad_diagrams(commands_data: dict, output_dir: str) -> None:
force=True # Force reconfiguration in case logging was already configured
)

# Load all commands_*.json files
# Load all commands_core.json and filter out stubbed commands
all_commands = {}
command_files = glob.glob('data/commands_*.json')

FILTER_PREFIXES = [
"BF.",
"CF.",
"CMS.",
"JSON.",
"FT.",
"_FT.",
"SEARCH.",
"TDIGEST.",
"TIMESERIES.",
"TOPK.",
"TS.",
]

logging.info("Loading commands from data/commands_core.json")
with open('data/commands_core.json', 'r') as f:
data = json.load(f)

filtered = {
key: value
for key, value in data.items()
if not key.startswith(tuple(FILTER_PREFIXES))
}
all_commands.update(filtered)

command_files = glob.glob('data/commands_r*.json')
for command_file in command_files:
logging.info(f"Loading commands from {command_file}")
with open(command_file, 'r') as f:
Expand Down Expand Up @@ -95,7 +121,6 @@ def generate_railroad_diagrams(commands_data: dict, output_dir: str) -> None:
md.fm_data['railroad_diagram'] = railroad_file.replace('static/', '/')

md.fm_data.update({
'syntax_str': str(c),
'syntax_fmt': sf,
})
md.persist()
1 change: 0 additions & 1 deletion content/commands/acl-cat.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ railroad_diagram: /images/railroad/acl-cat.svg
since: 6.0.0
summary: Lists the ACL categories, or the commands inside a category.
syntax_fmt: ACL CAT [category]
syntax_str: ''
title: ACL CAT
---
The command shows the available ACL categories if called without arguments.
Expand Down
1 change: 0 additions & 1 deletion content/commands/acl-deluser.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ railroad_diagram: /images/railroad/acl-deluser.svg
since: 6.0.0
summary: Deletes ACL users, and terminates their connections.
syntax_fmt: ACL DELUSER username [username ...]
syntax_str: ''
title: ACL DELUSER
---
Delete all the specified ACL users and terminate all the connections that are
Expand Down
1 change: 0 additions & 1 deletion content/commands/acl-dryrun.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ railroad_diagram: /images/railroad/acl-dryrun.svg
since: 7.0.0
summary: Simulates the execution of a command by a user, without executing the command.
syntax_fmt: ACL DRYRUN username command [arg [arg ...]]
syntax_str: command [arg [arg ...]]
title: ACL DRYRUN
---
Simulate the execution of a given command by a given user.
Expand Down
1 change: 0 additions & 1 deletion content/commands/acl-genpass.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ since: 6.0.0
summary: Generates a pseudorandom, secure password that can be used to identify ACL
users.
syntax_fmt: ACL GENPASS [bits]
syntax_str: ''
title: ACL GENPASS
---
ACL users need a solid password in order to authenticate to the server without
Expand Down
1 change: 0 additions & 1 deletion content/commands/acl-getuser.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ railroad_diagram: /images/railroad/acl-getuser.svg
since: 6.0.0
summary: Lists the ACL rules of a user.
syntax_fmt: ACL GETUSER username
syntax_str: ''
title: ACL GETUSER
---
The command returns all the rules defined for an existing ACL user.
Expand Down
1 change: 0 additions & 1 deletion content/commands/acl-help.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ railroad_diagram: /images/railroad/acl-help.svg
since: 6.0.0
summary: Returns helpful text about the different subcommands.
syntax_fmt: ACL HELP
syntax_str: ''
title: ACL HELP
---
The `ACL HELP` command returns a helpful text describing the different subcommands.
Expand Down
1 change: 0 additions & 1 deletion content/commands/acl-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ railroad_diagram: /images/railroad/acl-list.svg
since: 6.0.0
summary: Dumps the effective rules in ACL file format.
syntax_fmt: ACL LIST
syntax_str: ''
title: ACL LIST
---
The command shows the currently active ACL rules in the Redis server. Each
Expand Down
1 change: 0 additions & 1 deletion content/commands/acl-load.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ railroad_diagram: /images/railroad/acl-load.svg
since: 6.0.0
summary: Reloads the rules from the configured ACL file.
syntax_fmt: ACL LOAD
syntax_str: ''
title: ACL LOAD
---
When Redis is configured to use an ACL file (with the `aclfile` configuration
Expand Down
1 change: 0 additions & 1 deletion content/commands/acl-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ railroad_diagram: /images/railroad/acl-log.svg
since: 6.0.0
summary: Lists recent security events generated due to ACL rules.
syntax_fmt: ACL LOG [count | RESET]
syntax_str: ''
title: ACL LOG
---
The command shows a list of recent ACL security events:
Expand Down
1 change: 0 additions & 1 deletion content/commands/acl-save.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ railroad_diagram: /images/railroad/acl-save.svg
since: 6.0.0
summary: Saves the effective ACL rules in the configured ACL file.
syntax_fmt: ACL SAVE
syntax_str: ''
title: ACL SAVE
---
When Redis is configured to use an ACL file (with the `aclfile` configuration
Expand Down
1 change: 0 additions & 1 deletion content/commands/acl-setuser.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ railroad_diagram: /images/railroad/acl-setuser.svg
since: 6.0.0
summary: Creates and modifies an ACL user and its rules.
syntax_fmt: ACL SETUSER username [rule [rule ...]]
syntax_str: '[rule [rule ...]]'
title: ACL SETUSER
---
Create an ACL user with the specified rules or modify the rules of an
Expand Down
1 change: 0 additions & 1 deletion content/commands/acl-users.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ railroad_diagram: /images/railroad/acl-users.svg
since: 6.0.0
summary: Lists all ACL users.
syntax_fmt: ACL USERS
syntax_str: ''
title: ACL USERS
---
The command shows a list of all the usernames of the currently configured
Expand Down
1 change: 0 additions & 1 deletion content/commands/acl-whoami.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ railroad_diagram: /images/railroad/acl-whoami.svg
since: 6.0.0
summary: Returns the authenticated username of the current connection.
syntax_fmt: ACL WHOAMI
syntax_str: ''
title: ACL WHOAMI
---
Return the username the current connection is authenticated with.
Expand Down
1 change: 0 additions & 1 deletion content/commands/acl.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ railroad_diagram: /images/railroad/acl.svg
since: 6.0.0
summary: A container for Access List Control commands.
syntax_fmt: ACL
syntax_str: ''
title: ACL
---
This is a container command for [Access Control List]({{< relref "/operate/oss_and_stack/management/security/acl" >}}) commands.
Expand Down
2 changes: 0 additions & 2 deletions content/commands/append.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ railroad_diagram: /images/railroad/append.svg
since: 2.0.0
summary: Appends a string to the value of a key. Creates the key if it doesn't exist.
syntax_fmt: APPEND key value
syntax_str: value
title: APPEND
---
If `key` already exists and is a string, this command appends the `value` at the
Expand All @@ -68,7 +67,6 @@ APPEND mykey " World"
GET mykey
{{% /redis-cli %}}


## Pattern: Time series

The `APPEND` command can be used to create a very compact representation of a
Expand Down
1 change: 0 additions & 1 deletion content/commands/asking.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ railroad_diagram: /images/railroad/asking.svg
since: 3.0.0
summary: Signals that a cluster client is following an -ASK redirect.
syntax_fmt: ASKING
syntax_str: ''
title: ASKING
---
When a cluster client receives an `-ASK` redirect, the `ASKING` command is sent to the target node followed by the command which was redirected.
Expand Down
1 change: 0 additions & 1 deletion content/commands/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ railroad_diagram: /images/railroad/auth.svg
since: 1.0.0
summary: Authenticates the connection.
syntax_fmt: AUTH [username] password
syntax_str: password
title: AUTH
---
The AUTH command authenticates the current connection in two cases:
Expand Down
2 changes: 0 additions & 2 deletions content/commands/bf.add.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ since: 1.0.0
stack_path: docs/data-types/probabilistic
summary: Adds an item to a Bloom Filter
syntax_fmt: BF.ADD key item
syntax_str: item
title: BF.ADD
---
Adds an item to a Bloom filter.
Expand Down Expand Up @@ -65,7 +64,6 @@ redis> BF.ADD bf item1
|:----------------------|:-----------------|:------|
| <span title="Supported">&#x2705; Supported</span><br /> | <span title="Supported"><nobr>&#x2705; Flexible & Annual</nobr></span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | |


## Return information

{{< multitabs id="bf-add-return-info"
Expand Down
1 change: 0 additions & 1 deletion content/commands/bf.card.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ since: 2.4.4
stack_path: docs/data-types/probabilistic
summary: Returns the cardinality of a Bloom filter
syntax_fmt: BF.CARD key
syntax_str: ''
title: BF.CARD
---
Returns the cardinality of a Bloom filter - number of items that were added to a Bloom filter and detected as unique (items that caused at least one bit to be set in at least one sub-filter)
Expand Down
2 changes: 0 additions & 2 deletions content/commands/bf.exists.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ since: 1.0.0
stack_path: docs/data-types/probabilistic
summary: Checks whether an item exists in a Bloom Filter
syntax_fmt: BF.EXISTS key item
syntax_str: item
title: BF.EXISTS
---
Determines whether a given item was added to a Bloom filter.
Expand Down Expand Up @@ -66,7 +65,6 @@ redis> BF.EXISTS bf item2
|:----------------------|:-----------------|:------|
| <span title="Supported">&#x2705; Supported</span><br /> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | |


## Return information

{{< multitabs id="bf-exists-return-info"
Expand Down
2 changes: 0 additions & 2 deletions content/commands/bf.info.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ since: 1.0.0
stack_path: docs/data-types/probabilistic
summary: Returns information about a Bloom Filter
syntax_fmt: BF.INFO key [CAPACITY | SIZE | FILTERS | ITEMS | EXPANSION]
syntax_str: '[CAPACITY | SIZE | FILTERS | ITEMS | EXPANSION]'
title: BF.INFO
---
Returns information about a Bloom filter.
Expand Down Expand Up @@ -111,7 +110,6 @@ redis> BF.INFO bf1 CAPACITY
|:----------------------|:-----------------|:------|
| <span title="Supported">&#x2705; Supported</span><br /> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | |


## Return information

{{< multitabs id="bf-info-return-info"
Expand Down
3 changes: 0 additions & 3 deletions content/commands/bf.insert.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ summary: Adds one or more items to a Bloom Filter. A filter will be created if i
does not exist
syntax_fmt: "BF.INSERT key [CAPACITY\_capacity] [ERROR\_error]\n [EXPANSION\_expansion]\
\ [NOCREATE] [NONSCALING] ITEMS item [item\n ...]"
syntax_str: "[CAPACITY\_capacity] [ERROR\_error] [EXPANSION\_expansion] [NOCREATE]\
\ [NONSCALING] ITEMS item [item ...]"
title: BF.INSERT
---
Creates a new Bloom filter if the `key` does not exist using the specified error rate, capacity, and expansion, then adds all specified items to the Bloom Filter.
Expand Down Expand Up @@ -145,7 +143,6 @@ BF.INSERT filter NOCREATE ITEMS foo bar
|:----------------------|:-----------------|:------|
| <span title="Supported">&#x2705; Supported</span><br /> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | |


## Return information

{{< multitabs id="bf-insert-return-info"
Expand Down
2 changes: 0 additions & 2 deletions content/commands/bf.loadchunk.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ since: 1.0.0
stack_path: docs/data-types/probabilistic
summary: Restores a filter previously saved using SCANDUMP
syntax_fmt: BF.LOADCHUNK key iterator data
syntax_str: iterator data
title: BF.LOADCHUNK
---
Restores a Bloom filter previously saved using [`BF.SCANDUMP`]({{< relref "commands/bf.scandump/" >}}).
Expand Down Expand Up @@ -72,7 +71,6 @@ See [`BF.SCANDUMP`]({{< relref "commands/bf.scandump/" >}}) for an example.
|:----------------------|:-----------------|:------|
| <span title="Supported">&#x2705; Supported</span><br /> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | |


## Return information

{{< multitabs id="bf-loadchunk-return-info"
Expand Down
2 changes: 0 additions & 2 deletions content/commands/bf.madd.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ stack_path: docs/data-types/probabilistic
summary: Adds one or more items to a Bloom Filter. A filter will be created if it
does not exist
syntax_fmt: BF.MADD key item [item ...]
syntax_str: item [item ...]
title: BF.MADD
---
Adds one or more items to a Bloom filter.
Expand Down Expand Up @@ -62,7 +61,6 @@ One or more items to add.
|:----------------------|:-----------------|:------|
| <span title="Supported">&#x2705; Supported</span><br /> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | |


## Return information

Returns one of these replies:
Expand Down
2 changes: 0 additions & 2 deletions content/commands/bf.mexists.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ since: 1.0.0
stack_path: docs/data-types/probabilistic
summary: Checks whether one or more items exist in a Bloom Filter
syntax_fmt: BF.MEXISTS key item [item ...]
syntax_str: item [item ...]
title: BF.MEXISTS
---
Determines whether one or more items were added to a Bloom filter.
Expand Down Expand Up @@ -69,7 +68,6 @@ redis> BF.MEXISTS bf item1 item2 item3
|:----------------------|:-----------------|:------|
| <span title="Supported">&#x2705; Supported</span><br /> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | |


## Return information

{{< multitabs id="bf-mexists-return-info"
Expand Down
2 changes: 0 additions & 2 deletions content/commands/bf.reserve.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ since: 1.0.0
stack_path: docs/data-types/probabilistic
summary: Creates a new Bloom Filter
syntax_fmt: "BF.RESERVE key error_rate capacity [EXPANSION\_expansion]\n [NONSCALING]"
syntax_str: "error_rate capacity [EXPANSION\_expansion] [NONSCALING]"
title: BF.RESERVE
---
Creates an empty Bloom filter with a single sub-filter for the initial specified capacity and with an upper bound `error_rate`.
Expand Down Expand Up @@ -124,7 +123,6 @@ OK
|:----------------------|:-----------------|:------|
| <span title="Supported">&#x2705; Supported</span><br /> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | |


## Return information

{{< multitabs id="bf-reserve-return-info"
Expand Down
4 changes: 0 additions & 4 deletions content/commands/bf.scandump.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ since: 1.0.0
stack_path: docs/data-types/probabilistic
summary: Begins an incremental save of the bloom filter
syntax_fmt: BF.SCANDUMP key iterator
syntax_str: iterator
title: BF.SCANDUMP
---
Begins an incremental save of the Bloom filter.
Expand All @@ -52,8 +51,6 @@ is key name for a Bloom filter to save.
Iterator value; either 0 or the iterator from a previous invocation of this command
</details>



## Examples

{{< highlight bash >}}
Expand Down Expand Up @@ -103,7 +100,6 @@ for chunk in chunks:
|:----------------------|:-----------------|:------|
| <span title="Supported">&#x2705; Supported</span><br /> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | |


## Return information

{{< multitabs id="bf-scandump-return-info"
Expand Down
1 change: 0 additions & 1 deletion content/commands/bgrewriteaof.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ railroad_diagram: /images/railroad/bgrewriteaof.svg
since: 1.0.0
summary: Asynchronously rewrites the append-only file to disk.
syntax_fmt: BGREWRITEAOF
syntax_str: ''
title: BGREWRITEAOF
---
Instruct Redis to start an [Append Only File]({{< relref "/operate/oss_and_stack/management/persistence" >}}#append-only-file) rewrite process.
Expand Down
1 change: 0 additions & 1 deletion content/commands/bgsave.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ railroad_diagram: /images/railroad/bgsave.svg
since: 1.0.0
summary: Asynchronously saves the database(s) to disk.
syntax_fmt: BGSAVE [SCHEDULE]
syntax_str: ''
title: BGSAVE
---
Save the DB in background.
Expand Down
Loading