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

Function cbm_store_insert_edge_batch

src/store/store.c:2340–2355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2338/* ── Edge batch ─────────────────────────────────────────────────── */
2339
2340int cbm_store_insert_edge_batch(cbm_store_t *s, const cbm_edge_t *edges, int count) {
2341 if (count == 0) {
2342 return CBM_STORE_OK;
2343 }
2344
2345 exec_sql(s, "BEGIN IMMEDIATE;");
2346 for (int i = 0; i < count; i++) {
2347 int64_t id = cbm_store_insert_edge(s, &edges[i]);
2348 if (id == CBM_STORE_ERR) {
2349 exec_sql(s, "ROLLBACK;");
2350 return CBM_STORE_ERR;
2351 }
2352 }
2353 exec_sql(s, "COMMIT;");
2354 return CBM_STORE_OK;
2355}
2356
2357/* ── File hash CRUD ─────────────────────────────────────────────── */
2358

Callers 1

test_store_edges.cFile · 0.85

Calls 2

exec_sqlFunction · 0.85
cbm_store_insert_edgeFunction · 0.85

Tested by

no test coverage detected