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

Function Register_EntityFuncs

src/arithmetic/entity_funcs/entity_funcs.c:301–376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299}
300
301void Register_EntityFuncs() {
302 SIType *types;
303 SIType ret_type;
304 AR_FuncDesc *func_desc;
305
306 types = array_new(SIType, 1);
307 array_append(types, T_NULL | T_NODE | T_EDGE);
308 ret_type = T_NULL | T_INT64;
309 func_desc = AR_FuncDescNew("id", AR_ID, 1, 1, types, ret_type, false, true);
310 AR_RegFunc(func_desc);
311
312 types = array_new(SIType, 1);
313 array_append(types, T_NULL | T_NODE);
314 ret_type = T_NULL | T_ARRAY;
315 func_desc = AR_FuncDescNew("labels", AR_LABELS, 1, 1, types, ret_type, false, true);
316 AR_RegFunc(func_desc);
317
318 types = array_new(SIType, 2);
319 array_append(types, T_NULL | T_NODE);
320 array_append(types, T_ARRAY);
321 ret_type = T_NULL | T_BOOL;
322 func_desc = AR_FuncDescNew("hasLabels", AR_HAS_LABELS, 2, 2, types, ret_type, false, false);
323 AR_RegFunc(func_desc);
324
325 types = array_new(SIType, 1);
326 array_append(types, T_NULL | T_EDGE);
327 ret_type = T_NULL | T_STRING;
328 func_desc = AR_FuncDescNew("type", AR_TYPE, 1, 1, types, ret_type, false, true);
329 AR_RegFunc(func_desc);
330
331 types = array_new(SIType, 1);
332 array_append(types, T_NULL | T_EDGE);
333 ret_type = T_NULL | T_NODE;
334 func_desc = AR_FuncDescNew("startNode", AR_STARTNODE, 1, 1, types, ret_type, false, true);
335 AR_RegFunc(func_desc);
336
337 types = array_new(SIType, 1);
338 array_append(types, T_NULL | T_EDGE);
339 ret_type = T_NULL | T_NODE;
340 func_desc = AR_FuncDescNew("endNode", AR_ENDNODE, 1, 1, types, ret_type, false, true);
341 AR_RegFunc(func_desc);
342
343 types = array_new(SIType, 1);
344 array_append(types, T_NULL | SI_ALL);
345 ret_type = T_NULL | T_BOOL;
346 func_desc = AR_FuncDescNew("exists", AR_EXISTS, 1, 1, types, ret_type, false, true);
347 AR_RegFunc(func_desc);
348
349 types = array_new(SIType, 2);
350 array_append(types, T_NULL | T_NODE);
351 array_append(types, T_STRING | T_ARRAY);
352 ret_type = T_NULL | T_INT64;
353 func_desc = AR_FuncDescNew("indegree", AR_INCOMEDEGREE, 1, VAR_ARG_LEN, types, ret_type, false, true);
354 AR_RegFunc(func_desc);
355
356 types = array_new(SIType, 2);
357 array_append(types, T_NULL | T_NODE);
358 array_append(types, T_STRING | T_ARRAY);

Callers 1

AR_RegisterFuncsFunction · 0.85

Calls 2

AR_FuncDescNewFunction · 0.85
AR_RegFuncFunction · 0.85

Tested by

no test coverage detected