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

Function edge_prop

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

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