Commit Graph

35 Commits

Author SHA1 Message Date
Binbin
9e1b879f5b Make PFMERGE source key optional in docs, add tests with one input key, add tests on missing source keys (#11205)
The following two cases will create an empty destkey HLL:
1. called with no source keys, like `pfmerge destkey`
2. called with non-existing source keys, like `pfmerge destkey non-existing-source-key`

In the first case, in `PFMERGE`, the dest key is actually one of the source keys too.
So `PFMERGE k1 k2` is equivalent to `SUNIONSTORE k1 k1 k2`,
and `PFMERGE k1` is equivalent to `SUNIONSTORE k1 k1`.
So the first case is reasonable, the source key is actually optional.

And the second case, `PFMERGE` on missing keys should succeed and create an empty dest.
This is consistent with `PFCOUNT`, and also with `SUNIONSTORE`, no need to change.
2022-10-22 20:41:17 +03:00
Oran Agra
b4568fc78a update help.h (#10961) 2022-07-11 12:36:03 +03:00
Binbin
3d56f607b7 Handle multiple_token flag in generate-command-help.rb (#10822)
Currently generate-command.help.rb dose not handle the
multiple_token flag, handle this flag in this PR.
The format is the same as redis-cli rendering.
```diff
- bitfield_ro key GET encoding offset [encoding offset ...]
+ bitfield_ro key GET encoding offset [GET encoding offset ...]
```

Re run generate-command-code.py which was forget in #10820.
Also change the flag value from string to bool, like "true" to true
2022-06-07 10:15:39 +03:00
Oran Agra
b0272252f7 update help.h (#10818)
before releasing 7.0.1
2022-06-06 11:39:53 +03:00
Itamar Haber
3e09a8c097 Fixes commands' syntices (#10534)
Fixes in command argument in json files
* Fixes BITFIELD's syntax ("sub-commands" can be repeated, and OVERFLOW is only valid for SET and INCR)
* Improves readability of SET (reordered)
* Fixes GEOSEARCH and GEOSEARCH_RO syntices (use `oneof` for mutually exclusive group instead of `optional`)
* Fixes MIGRATE syntax (use `oneof` for mutually exclusive group instead of `optional`)
* Fixes MODULE LOADEX syntax (the `CONFIG` token should be repeated too when using multiple configs)

other:
* make generate-command-help.rb accept a path to commands.json, or read it from stdin (e.g. `generate-commands-json.py | generate-command-help.rb -`)
2022-04-06 09:33:33 +03:00
Oran Agra
acfb4f7a44 update static help.h from redis.io commands.json (#10529) 2022-04-05 12:09:51 +03:00
Oran Agra
fa5d90069f update redis-cli help.h (#10352)
re-generate help.h from commands.json
2022-02-28 10:59:16 +02:00
Binbin
e662f6835e Update FCALL/FCALL_RO summary and complexity (#10240)
1. Update fcall.json and fcall_ro.json
2. Update command.c
3. Update help.h
2022-02-05 10:35:07 +02:00
Oran Agra
ef93125988 update help.h before release (#10210) 2022-01-30 22:53:13 +02:00
Yossi Gottlieb
068190a802 Update generate-command-help.rb and help.h. (#10196)
There are some inevitable changes between the old and new output, as a
result of the different `commands.json` semantics.
2022-01-27 21:48:06 +02:00
Oran Agra
7b48de68ce Remove useless - from help.h on commands with no arguments (#8939)
As far as i can tell it shows up in redis-cli in both HELP, e.g.
`help client list`, and also in the command completion tips, but it is
unclear what it was needed for.
It exists since the very first commit that added this mechanism.
2021-05-18 17:13:10 +03:00
Oran Agra
4de1031d8a update help.h (#8747) 2021-04-06 12:42:18 +03:00
Oran Agra
8e83bcd2ac update help.h from redis.io commands.json (#8524) 2021-02-22 15:48:17 +02:00
Oran Agra
b57d0eb418 update help.h with new commands (#8426) 2021-01-31 12:16:58 +02:00
sundb
cd1c600548 Typo fix: entires -> entries (#8031) 2020-11-08 08:32:38 +02:00
antirez
ca58198a76 help.h updated. 2020-06-12 12:16:19 +02:00
Paul Spooren
a7936ef96d LRANK: Add command (the command will be renamed LPOS).
The `LRANK` command returns the index (position) of a given element
within a list. Using the `direction` argument it is possible to specify
going from head to tail (acending, 1) or from tail to head (decending,
-1). Only the first found index is returend. The complexity is O(N).

When using lists as a queue it can be of interest at what position a
given element is, for instance to monitor a job processing through a
work queue. This came up within the Python `rq` project which is based
on Redis[0].

[0]: https://github.com/rq/rq/issues/1197

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-06-10 12:07:40 +02:00
antirez
69ce235c7b Update help.h again before Redis 6 GA. 2020-04-30 13:43:05 +02:00
antirez
6fcdf75325 redis-cli command help updated. 2020-04-30 13:00:37 +02:00
antirez
ad78b50f62 Update help.h for redis-cli. 2018-10-17 12:57:21 +02:00
Mustafa Paltun
6d0acb330a Update help.h 2018-06-27 16:33:31 +03:00
antirez
2268d7e5dd redis-cli inline help updated. 2018-06-07 18:53:00 +02:00
antirez
cd8e688226 redis-cli help.h updated. 2016-06-14 14:45:28 +02:00
antirez
70b3314141 redis-cli help.h updated. 2016-04-13 12:35:18 +02:00
antirez
f3dd472e97 Update redis-cli help and the script to generate it. 2015-11-17 15:38:34 +01:00
Alon Diamant
288028876f Added <count> parameter to SPOP:
spopCommand() now runs spopWithCountCommand() in case the <count> param is found.
Added intsetRandomMembers() to Intset: Copies N random members from the set into inputted 'values' array. Uses either the Knuth or Floyd sample algos depending on ratio count/size.
Added setTypeRandomElements() to SET type: Returns a number of random elements from a non empty set. This is a version of setTypeRandomElement() that is modified in order to return multiple entries, using dictGetRandomKeys() and intsetRandomMembers().
Added tests for SPOP with <count>: unit/type/set, unit/scripting, integration/aof
--
Cleaned up code a bit to match with required Redis coding style
2014-12-14 12:25:42 +02:00
antirez
20c040d364 redis-cli help.h updated. 2014-04-22 16:14:38 +02:00
antirez
25e049cc68 redis-cli: help.h updated. 2013-05-14 11:23:16 +02:00
antirez
08a4f12e76 help.h update (adds bitop, bitcount, evalsha...) 2012-10-30 18:57:20 +01:00
antirez
841048f2c8 redis-cli commands description in help.h updated. 2012-04-27 15:57:27 +02:00
antirez
1ad4d50805 redis-cli help.h updated. Script to generate it updated as well. 2012-04-03 15:30:33 +02:00
antirez
6418b4c790 help.h updated 2010-12-15 17:39:40 +01:00
Pieter Noordhuis
a2a69d5803 Refactor help-related code into redis-cli.c 2010-11-28 21:37:19 +01:00
Pieter Noordhuis
50d0e82d54 Update help.h generator script to output man-style argument list 2010-11-28 17:45:58 +01:00
Tj Holowaychuk
5397f2b596 Added redis-cli interactive help support
updated via commands.json in redis-doc repo. Currently
use `make src/help.h` to re-generate. The following
are valid from the REPL:

  help
  help [command]
  help [group]
  help groups

ex:

  help sort
  help hash
2010-11-16 05:50:26 -08:00