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

Function QGNode_ToString

src/graph/entities/qg_node.c:257–274  ·  view source on GitHub ↗

gets a string representation of given node

Source from the content-addressed store, hash-verified

255
256// gets a string representation of given node
257void QGNode_ToString
258(
259 const QGNode *n, // target node
260 sds *buff // result buffer (concatenated)
261) {
262 ASSERT(n != NULL);
263 ASSERT(buff != NULL);
264
265 *buff = sdscatprintf(*buff, "(");
266
267 if(n->alias) *buff = sdscatprintf(*buff, "%s", n->alias);
268
269 for(uint i = 0; i < QGNode_LabelCount(n); i++) {
270 *buff = sdscatprintf(*buff, ":%s", n->labels[i]);
271 }
272
273 *buff = sdscatprintf(*buff, ")");
274}
275
276void QGNode_Free
277(

Callers

nothing calls this directly

Calls 2

sdscatprintfFunction · 0.85
QGNode_LabelCountFunction · 0.85

Tested by

no test coverage detected