Deletes a library and its functions.
FUNCTION
DELETE
library-name
Delete a library and all its functions.
This command deletes the library called library-name and all functions in it. If the library doesn’t exist, the server returns an error.
For more information please refer to Introduction to Valkey Functions.
Simple string
reply: OK
.
O(1)
@scripting @slow @write
127.0.0.1:6379> FUNCTION LOAD "#!lua name=mylib \n server.register_function('myfunc', function(keys, args) return 'hello' end)"
"mylib"
127.0.0.1:6379> FCALL myfunc 0
"hello"
127.0.0.1:6379> FUNCTION DELETE mylib
OK
127.0.0.1:6379> FCALL myfunc 0
(error) ERR Function not found
EVAL, EVALSHA, EVALSHA_RO, EVAL_RO, FCALL, FCALL_RO, FUNCTION, FUNCTION DUMP, FUNCTION FLUSH, FUNCTION HELP, FUNCTION KILL, FUNCTION LIST, FUNCTION LOAD, FUNCTION RESTORE, FUNCTION STATS, SCRIPT, SCRIPT DEBUG, SCRIPT EXISTS, SCRIPT FLUSH, SCRIPT HELP, SCRIPT KILL, SCRIPT LOAD, SCRIPT SHOW.