MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / Proc_SPpathsInvoke

Function Proc_SPpathsInvoke

src/procedures/proc_sp_paths.c:664–685  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

662}
663
664static ProcedureResult Proc_SPpathsInvoke
665(
666 ProcedureCtx *ctx,
667 const SIValue *args,
668 const char **yield
669) {
670 SinglePairCtx *single_pair_ctx = rm_calloc(1, sizeof(SinglePairCtx));
671 if(!validate_config(args[0], single_pair_ctx)) {
672 SinglePairCtx_Free(single_pair_ctx);
673 return PROCEDURE_ERR;
674 }
675 ctx->privateData = single_pair_ctx;
676
677 single_pair_ctx->output = array_new(SIValue, 3);
678 _process_yield(single_pair_ctx, yield);
679
680 if(single_pair_ctx->path_count == 0) SPpaths_all_minimal(single_pair_ctx);
681 else if(single_pair_ctx->path_count == 1) SPpaths_single_minimal(single_pair_ctx);
682 else SPpaths_k_minimal(single_pair_ctx);
683
684 return PROCEDURE_OK;
685}
686
687static SIValue *Proc_SPpathsStep
688(

Callers

nothing calls this directly

Calls 7

rm_callocFunction · 0.85
SinglePairCtx_FreeFunction · 0.85
SPpaths_all_minimalFunction · 0.85
SPpaths_single_minimalFunction · 0.85
SPpaths_k_minimalFunction · 0.85
validate_configFunction · 0.70
_process_yieldFunction · 0.70

Tested by

no test coverage detected