*Redis FUNCTION HELP 命令

FUNCTION HELP 用于返回 Redis 函数(Redis Functions)子命令的帮助信息。


*语法

FUNCTION HELP

*参数说明

无参数。


*返回值

  • Array of Bulk Strings:FUNCTION 子命令的帮助文本列表

*时间复杂度

O(1)

*

*示例

*基本用法

> FUNCTION HELP
 1) "FUNCTION <subcommand> [<arg> [value] [opt] ...]. Subcommands are:"
 2) "DUMP - Return a serialized payload representing the current loaded functions."
 3) "FLUSH [ASYNC|SYNC] - Delete all the functions."
 4) "KILL - Kill a running function."
 5) "LIST [LIBRARYNAME <library name>] [WITHCODE] - Return information about functions."
 6) "LOAD <payload> - Create a new function with the given payload."
 7) "RESTORE <payload> [FLUSH|APPEND] - Restore the functions from the given payload."
 8) "STATS - Return information about the current function execution."
 9) "DELETE <name> - Delete the function by name."
10) "HELP - Print this help."

*常见错误

无常见错误。


*最佳实践

  • 场景:快速查看 FUNCTION 子命令列表、了解参数格式
  • 建议不熟悉 FUNCTION 命令时优先执行 HELP
  • 可以作为脚本中生成命令文档的参考来源

*FAQ

Q1: FUNCTION HELP 和其他命令的 HELP 有什么区别? A: Redis 7.0 引入了 FUNCTION 命令族,HELP 是该命令族的内建帮助,专门用于函数管理相关的子命令说明。

Q2: 返回的帮助信息会变化吗? A: 会随着 Redis 版本更新而变化,新增子命令时 HELP 输出会相应更新。

Q3: 有办法获取某个具体子命令的详细帮助吗? A: 目前 FUNCTION HELP 只返回整体帮助,详细用法需要参考官方文档或各子命令的独立文档。