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

Function Proc_Get

src/procedures/procedure.c:69–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69ProcedureCtx *Proc_Get(const char *proc_name) {
70 if(!__procedures) return NULL;
71 size_t proc_name_len = strlen(proc_name) + 1;
72 char proc_name_lowercase [proc_name_len];
73 str_tolower_ascii(proc_name, proc_name_lowercase, &proc_name_len);
74 ProcGenerator gen = raxFind(__procedures, (unsigned char *)proc_name_lowercase,
75 proc_name_len);
76 if(gen == raxNotFound) return NULL;
77 ProcedureCtx *ctx = gen();
78
79 // Set procedure state to not initialized.
80 ctx->state = PROCEDURE_NOT_INIT;
81 return ctx;
82}
83
84ProcedureResult Proc_Invoke(ProcedureCtx *proc, const SIValue *args, const char **yield) {
85 ASSERT(proc != NULL);

Callers 6

_Validate_CALL_ClauseFunction · 0.85
AST_ReadOnlyFunction · 0.85
AST_BuildCallColumnNamesFunction · 0.85
NewProcCallOpFunction · 0.85
ProcCallConsumeFunction · 0.85
_BuildCallProjectionsFunction · 0.85

Calls 1

str_tolower_asciiFunction · 0.85

Tested by

no test coverage detected