Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

FUNCTION LIST

Last updated
FUNCTION LIST [LIBRARYNAME library-name-pattern] [WITHCODE]
Group
Scripting and functions
Complexity
O(N) where N is the number of functions
Arity
-2 (at least 2 words, counting the command name)
HotKV Cloud
All plans
On-Premise
no license needed

FUNCTION LIST describes every loaded library: its name, engine, and each function with its description and flags.

Option Effect
LIBRARYNAME library-name-pattern List only libraries whose names match this glob pattern.
WITHCODE Include each library’s source code.

Each option may be given once.

Case RESP2 RESP3
Always Array with one entry per library, each a flat array of field, value pairs Array of maps

Each library has the fields library_name, engine (LUA), functions and, with WITHCODE, library_code. Each function has name, description (nil when none was given) and flags (an array in RESP2, a set in RESP3).

Errors:

  • ERR library name argument was not given when LIBRARYNAME has no value.
  • ERR Unknown argument <argument> for any other argument, or an option given twice.
127.0.0.1:6379> FUNCTION LOAD "#!lua name=util\nredis.register_function('echo', function(keys, args) return args[1] end)"
"util"
127.0.0.1:6379> FUNCTION LIST LIBRARYNAME ut*
1) 1) "library_name"
2) "util"
3) "engine"
4) "LUA"
5) "functions"
6) 1) 1) "name"
2) "echo"
3) "description"
4) (nil)
5) "flags"
6) (empty array)

Same as Redis 7 and Valkey 8.

FUNCTION LOAD, FUNCTION STATS, FCALL