MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / edge_prop

Function edge_prop

src/cypher/cypher.c:2489–2502  ·  view source on GitHub ↗

Get edge property by name. Uses rotating thread-local buffers to allow * multiple concurrent calls (e.g. projecting r.url_path, r.confidence * in the same row). */

Source from the content-addressed store, hash-verified

2487 * multiple concurrent calls (e.g. projecting r.url_path, r.confidence
2488 * in the same row). */
2489static const char *edge_prop(const cbm_edge_t *e, const char *prop) {
2490 if (!e || !prop) {
2491 return "";
2492 }
2493 if (strcmp(prop, "type") == 0) {
2494 return e->type ? e->type : "";
2495 }
2496 /* Rotate through 8 thread-local buffers so multiple props can be accessed per row. */
2497 static CBM_TLS char ebufs[CYP_BUF_8][CBM_SZ_512];
2498 static CBM_TLS int ebuf_idx = 0;
2499 char *buf = ebufs[ebuf_idx++ & CYP_EBUF_MASK];
2500 json_extract_prop(e->properties_json, prop, buf, CBM_SZ_512);
2501 return buf;
2502}
2503
2504/* Find an edge variable in a binding */
2505static cbm_edge_t *binding_get_edge(binding_t *b, const char *var) {

Callers 3

resolve_condition_valueFunction · 0.85
binding_get_virtualFunction · 0.85
project_star_varFunction · 0.85

Calls 1

json_extract_propFunction · 0.85

Tested by

no test coverage detected