Rework CallProcedure to validate result sets
Summary: This diff renames `__reload__` procedure to be `mg.reload` accepting a module name. The main CallCustomProcedure function is now split into multiple parts, so that there's more control over finding a procedure, type checking its arguments and finally checking the returned result set. Depends on D2572 Reviewers: mferencevic, ipaljak Reviewed By: ipaljak Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D2573
This commit is contained in:
@@ -68,7 +68,8 @@ int mgp_init_module(struct mgp_module *module, struct mgp_memory *memory) {
|
||||
}
|
||||
mgp_value_destroy(null_value);
|
||||
if (!mgp_proc_add_result(proc, "result", mgp_type_string())) return 1;
|
||||
if (!mgp_proc_add_result(proc, "args", mgp_type_list(mgp_type_any())))
|
||||
if (!mgp_proc_add_result(proc, "args",
|
||||
mgp_type_list(mgp_type_nullable(mgp_type_any()))))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user