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

Function SIEdge_HashCode

src/value.c:669–684  ·  view source on GitHub ↗

Hashes the id and properties of the edge. */

Source from the content-addressed store, hash-verified

667
668/* Hashes the id and properties of the edge. */
669XXH64_hash_t SIEdge_HashCode(const SIValue v) {
670 XXH_errorcode res;
671 XXH64_state_t state;
672 res = XXH64_reset(&state, 0);
673 UNUSED(res);
674 ASSERT(res != XXH_ERROR);
675
676 Edge *e = (Edge *)v.ptrval;
677 int id = ENTITY_GET_ID(e);
678 SIType t = SI_TYPE(v);
679 XXH64_update(&state, &(t), sizeof(t));
680 XXH64_update(&state, &id, sizeof(id));
681
682 XXH64_hash_t hashCode = XXH64_digest(&state);
683 return hashCode;
684}
685
686void SIValue_HashUpdate(SIValue v, XXH64_state_t *state) {
687 // handles null value and defaults

Callers 1

SIValue_HashUpdateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected