function-restore.3valkey - Man Page
Restores all libraries from a payload.
Synopsis
FUNCTION RESTORE
serialized-value [FLUSH
| APPEND
| REPLACE
]
Description
Restore libraries from the serialized payload.
You can use the optional policy argument to provide a policy for handling existing libraries. The following policies are allowed:
- APPEND: appends the restored libraries to the existing libraries and aborts on collision. This is the default policy.
- FLUSH: deletes all existing libraries before restoring the payload.
- REPLACE: appends the restored libraries to the existing libraries, replacing any existing ones in case of name collisions. Note that this policy doesn’t prevent function name collisions, only libraries.
For more information please refer to valkey-functions-intro(7) Introduction to Valkey Functions.
Reply
valkey-protocol(7) Simple string reply: OK
.
Complexity
O(N) where N is the number of functions on the payload
Acl Categories
@scripting @slow @write
History
- Available since: 7.0.0
See Also
eval(3valkey), evalsha(3valkey), evalsha_ro(3valkey), eval_ro(3valkey), fcall(3valkey), fcall_ro(3valkey), function(3valkey), function-delete(3valkey), function-dump(3valkey), function-flush(3valkey), function-help(3valkey), function-kill(3valkey), function-list(3valkey), function-load(3valkey), function-stats(3valkey), script(3valkey), script-debug(3valkey), script-exists(3valkey), script-flush(3valkey), script-help(3valkey), script-kill(3valkey), script-load(3valkey), script-show(3valkey)