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

Function Register_MapFuncs

src/arithmetic/map_funcs/map_funcs.c:103–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103void Register_MapFuncs() {
104 SIType *types;
105 SIType ret_type;
106 AR_FuncDesc *func_desc;
107
108 types = array_new(SIType, 1);
109 array_append(types, SI_ALL);
110 ret_type = T_MAP;
111 func_desc = AR_FuncDescNew("tomap", AR_TOMAP, 0, VAR_ARG_LEN, types, ret_type, true, true);
112 AR_RegFunc(func_desc);
113
114 types = array_new(SIType, 1);
115 array_append(types, T_NULL | T_MAP | T_NODE | T_EDGE);
116 ret_type = T_NULL | T_ARRAY;
117 func_desc = AR_FuncDescNew("keys", AR_KEYS, 1, 1, types, ret_type, false, true);
118 AR_RegFunc(func_desc);
119
120 types = array_new(SIType, 1);
121 array_append(types, T_NULL | T_MAP | T_NODE | T_EDGE);
122 ret_type = T_NULL | T_MAP;
123 func_desc = AR_FuncDescNew("properties", AR_PROPERTIES, 1, 1, types, ret_type, false, true);
124 AR_RegFunc(func_desc);
125
126 types = array_new(SIType, 2);
127 array_append(types, T_NULL | T_MAP);
128 array_append(types, T_NULL | T_MAP);
129 ret_type = T_NULL | T_MAP;
130 func_desc = AR_FuncDescNew("merge_maps", AR_MERGEMAP, 2, 2, types, ret_type, true, true);
131 AR_RegFunc(func_desc);
132}
133

Callers 1

AR_RegisterFuncsFunction · 0.85

Calls 2

AR_FuncDescNewFunction · 0.85
AR_RegFuncFunction · 0.85

Tested by

no test coverage detected