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

Function cbm_write_db

internal/cbm/sqlite_writer.c:2287–2301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2285}
2286
2287int cbm_write_db(const char *path, const char *project, const char *root_path,
2288 const char *indexed_at, CBMDumpNode *nodes, int node_count, CBMDumpEdge *edges,
2289 int edge_count, CBMDumpVector *vectors, int vector_count,
2290 CBMDumpTokenVec *token_vecs, int token_vec_count) {
2291 /* One-shot = open + append all nodes in a single batch + finalize.
2292 * Produces byte-identical output to the former monolithic writer. */
2293 cbm_db_writer_t *w = cbm_writer_open(path);
2294 if (!w) {
2295 return CBM_NOT_FOUND;
2296 }
2297 (void)cbm_writer_append_nodes(w, nodes,
2298 node_count); /* error recorded in w, handled by finalize */
2299 return cbm_writer_finalize(w, project, root_path, indexed_at, nodes, node_count, edges,
2300 edge_count, vectors, vector_count, token_vecs, token_vec_count);
2301}

Callers 1

Calls 3

cbm_writer_openFunction · 0.85
cbm_writer_append_nodesFunction · 0.85
cbm_writer_finalizeFunction · 0.85

Tested by

no test coverage detected