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

Function cbm_write_db

internal/cbm/sqlite_writer.c:2436–2450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2434}
2435
2436int cbm_write_db(const char *path, const char *project, const char *root_path,
2437 const char *indexed_at, CBMDumpNode *nodes, int node_count, CBMDumpEdge *edges,
2438 int edge_count, CBMDumpVector *vectors, int vector_count,
2439 CBMDumpTokenVec *token_vecs, int token_vec_count) {
2440 /* One-shot = open + append all nodes in a single batch + finalize.
2441 * Produces byte-identical output to the former monolithic writer. */
2442 cbm_db_writer_t *w = cbm_writer_open(path);
2443 if (!w) {
2444 return CBM_NOT_FOUND;
2445 }
2446 (void)cbm_writer_append_nodes(w, nodes,
2447 node_count); /* error recorded in w, handled by finalize */
2448 return cbm_writer_finalize(w, project, root_path, indexed_at, nodes, node_count, edges,
2449 edge_count, vectors, vector_count, token_vecs, token_vec_count);
2450}

Callers 2

Calls 3

cbm_writer_openFunction · 0.85
cbm_writer_append_nodesFunction · 0.85
cbm_writer_finalizeFunction · 0.85

Tested by 1