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

Function Proc_SSpathsInvoke

src/procedures/proc_ss_paths.c:655–676  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

653}
654
655static ProcedureResult Proc_SSpathsInvoke
656(
657 ProcedureCtx *ctx,
658 const SIValue *args,
659 const char **yield
660) {
661 SingleSourceCtx *single_source_ctx = rm_calloc(1, sizeof(SingleSourceCtx));
662 if(!validate_config(args[0], single_source_ctx)) {
663 SingleSourceCtx_Free(single_source_ctx);
664 return PROCEDURE_ERR;
665 }
666 ctx->privateData = single_source_ctx;
667
668 single_source_ctx->output = array_new(SIValue, 3);
669 _process_yield(single_source_ctx, yield);
670
671 if(single_source_ctx->path_count == 0) SSpaths_all_minimal(single_source_ctx);
672 else if(single_source_ctx->path_count == 1) SSpaths_single_minimal(single_source_ctx);
673 else SSpaths_k_minimal(single_source_ctx);
674
675 return PROCEDURE_OK;
676}
677
678static SIValue *Proc_SSpathsStep
679(

Callers

nothing calls this directly

Calls 7

rm_callocFunction · 0.85
SingleSourceCtx_FreeFunction · 0.85
SSpaths_all_minimalFunction · 0.85
SSpaths_single_minimalFunction · 0.85
SSpaths_k_minimalFunction · 0.85
validate_configFunction · 0.70
_process_yieldFunction · 0.70

Tested by

no test coverage detected