summaryrefslogtreecommitdiff
path: root/utils/generate-command-code.py
diff options
context:
space:
mode:
authorguybe7 <guy.benoish@redislabs.com>2022-01-30 11:00:03 +0100
committerGitHub <noreply@github.com>2022-01-30 12:00:03 +0200
commiteedec155acdd0ead3536edf6988e250a1a9fcb3e (patch)
tree5bd57919652dfb4bcfe387cacd89f5952063f2a0 /utils/generate-command-code.py
parentbe0d2933545354f4868f8e4807a11f8e79c03736 (diff)
downloadredis-eedec155acdd0ead3536edf6988e250a1a9fcb3e.tar.gz
Add key-specs notes (#10193)
Add optional `notes` to keyspecs. Other changes: 1. Remove the "incomplete" flag from SORT and SORT_RO: it is misleading since "incomplete" means "this spec may not return all the keys it describes" but SORT and SORT_RO's specs (except the input key) do not return any keys at all. So basically: If a spec's begin_search is "unknown" you should not use it at all, you must use COMMAND KEYS; if a spec itself is "incomplete", you can use it to get a partial list of keys, but if you want all of them you must use COMMAND GETKEYS; otherwise, the spec will return all the keys 2. `getKeysUsingKeySpecs` handles incomplete specs internally
Diffstat (limited to 'utils/generate-command-code.py')
-rwxr-xr-xutils/generate-command-code.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/generate-command-code.py b/utils/generate-command-code.py
index 28ad03a1f..2a4bd5ccc 100755
--- a/utils/generate-command-code.py
+++ b/utils/generate-command-code.py
@@ -119,7 +119,8 @@ class KeySpec(object):
print("Invalid find_keys! value=%s" % self.spec["find_keys"])
exit(1)
- return "%s,%s,%s" % (
+ return "%s,%s,%s,%s" % (
+ get_optional_desc_string(self.spec, "notes"),
_flags_code(),
_begin_search_code(),
_find_keys_code()