FUNCTION LIST
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.
Options
Section titled “Options”| 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.
Return value
Section titled “Return value”| 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 givenwhenLIBRARYNAMEhas no value.ERR Unknown argument <argument>for any other argument, or an option given twice.
Examples
Section titled “Examples”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)Compatibility
Section titled “Compatibility”Same as Redis 7 and Valkey 8.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.