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

Function AR_GetFunc

src/arithmetic/func_desc.c:68–85  ·  view source on GitHub ↗

get arithmetic function

Source from the content-addressed store, hash-verified

66
67// get arithmetic function
68AR_FuncDesc *AR_GetFunc
69(
70 const char *func_name,
71 bool include_internal
72) {
73 size_t len = strlen(func_name);
74 char lower_func_name[len + 1];
75 str_tolower_ascii(func_name, lower_func_name, &len);
76 void *f = raxFind(__aeRegisteredFuncs, (unsigned char *)lower_func_name, len);
77
78 if(f == raxNotFound) return NULL;
79
80 AR_FuncDesc *func = (AR_FuncDesc*)f;
81
82 if(func->internal && !include_internal) return NULL;
83
84 return func;
85}
86
87SIType AR_FuncDesc_RetType
88(

Callers 1

AR_EXP_NewOpNodeFunction · 0.85

Calls 1

str_tolower_asciiFunction · 0.85

Tested by

no test coverage detected