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

Function GraphContext_GetAttributeID

src/graph/graphcontext.c:515–530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

513}
514
515Attribute_ID GraphContext_GetAttributeID
516(
517 GraphContext *gc,
518 const char *attribute
519) {
520 // Acquire a read lock for looking up the attribute.
521 pthread_rwlock_rdlock(&gc->_attribute_rwlock);
522 // Look up the attribute ID.
523 void *id = raxFind(gc->attributes, (unsigned char *)attribute, strlen(attribute));
524 // Release the lock.
525 pthread_rwlock_unlock(&gc->_attribute_rwlock);
526
527 if(id == raxNotFound) return ATTRIBUTE_ID_NONE;
528
529 return (uintptr_t)id;
530}
531
532void GraphContext_RemoveAttribute
533(

Callers 10

_index_operation_deleteFunction · 0.85
_Constraint_DropFunction · 0.85
_RdbLoadExactMatchIndexFunction · 0.85
ApplyAddAttributeFunction · 0.85
AR_PROPERTYFunction · 0.85
_validateFieldConfigMapFunction · 0.85
validate_configFunction · 0.85
validate_configFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected