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

Function doccand_clear

tests/test_mcp.c:15329–15340  ·  view source on GitHub ↗

Remove the project DB (and its WAL/SHM) so the next index is a full one. */

Source from the content-addressed store, hash-verified

15327
15328/* Remove the project DB (and its WAL/SHM) so the next index is a full one. */
15329static void doccand_clear(const char *cache) {
15330 char path[CBM_SZ_4K];
15331 if (!doccand_project_db(cache, path, sizeof(path))) {
15332 return;
15333 }
15334 char side[CBM_SZ_4K + 8];
15335 snprintf(side, sizeof(side), "%s-wal", path);
15336 cbm_unlink(side);
15337 snprintf(side, sizeof(side), "%s-shm", path);
15338 cbm_unlink(side);
15339 cbm_unlink(path);
15340}
15341
15342/* The project's doc_link_candidates rows (0 without the table); -1 on an
15343 * error. */

Callers 1

doccand_indexFunction · 0.85

Calls 2

doccand_project_dbFunction · 0.85
cbm_unlinkFunction · 0.85

Tested by

no test coverage detected