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

Function QGNode_HasLabel

src/graph/entities/qg_node.c:114–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114bool QGNode_HasLabel
115(
116 const QGNode *n,
117 const char *l
118) {
119 ASSERT(n != NULL);
120 ASSERT(l != NULL);
121
122 uint label_count = QGNode_LabelCount(n);
123 for(uint i = 0; i < label_count; i++) {
124 if(strcmp(n->labels[i], l) == 0) return true;
125 }
126
127 return false;
128}
129
130void QGNode_AddLabel
131(

Callers 1

QGNode_AddLabelFunction · 0.85

Calls 1

QGNode_LabelCountFunction · 0.85

Tested by

no test coverage detected