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

Function edge_prop

src/cypher/cypher.c:2408–2421  ·  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

2406 * multiple concurrent calls (e.g. projecting r.url_path, r.confidence
2407 * in the same row). */
2408static const char *edge_prop(const cbm_edge_t *e, const char *prop) {
2409 if (!e || !prop) {
2410 return "";
2411 }
2412 if (strcmp(prop, "type") == 0) {
2413 return e->type ? e->type : "";
2414 }
2415 /* Rotate through 8 thread-local buffers so multiple props can be accessed per row. */
2416 static CBM_TLS char ebufs[CYP_BUF_8][CBM_SZ_512];
2417 static CBM_TLS int ebuf_idx = 0;
2418 char *buf = ebufs[ebuf_idx++ & CYP_EBUF_MASK];
2419 json_extract_prop(e->properties_json, prop, buf, CBM_SZ_512);
2420 return buf;
2421}
2422
2423/* Find an edge variable in a binding */
2424static 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