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

Function SINode_HashCode

src/value.c:651–666  ·  view source on GitHub ↗

Hashes the id and properties of the node*/

Source from the content-addressed store, hash-verified

649
650/* Hashes the id and properties of the node*/
651XXH64_hash_t SINode_HashCode(const SIValue v) {
652 XXH_errorcode res;
653 XXH64_state_t state;
654 res = XXH64_reset(&state, 0);
655 UNUSED(res);
656 ASSERT(res != XXH_ERROR);
657
658 Node *n = (Node *)v.ptrval;
659 int id = ENTITY_GET_ID(n);
660 SIType t = SI_TYPE(v);
661 XXH64_update(&state, &(t), sizeof(t));
662 XXH64_update(&state, &id, sizeof(id));
663
664 XXH64_hash_t hashCode = XXH64_digest(&state);
665 return hashCode;
666}
667
668/* Hashes the id and properties of the edge. */
669XXH64_hash_t SIEdge_HashCode(const SIValue v) {

Callers 1

SIValue_HashUpdateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected