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

Function cbm_config_delete

src/cli/cli.c:7526–7541  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7524}
7525
7526int cbm_config_delete(cbm_config_t *cfg, const char *key) {
7527 if (!cfg || !key) {
7528 return CLI_ERR;
7529 }
7530
7531 sqlite3_stmt *stmt = NULL;
7532 if (sqlite3_prepare_v2(cfg->db, "DELETE FROM config WHERE key = ?", SQL_NUL_TERM, &stmt,
7533 NULL) != SQLITE_OK) {
7534 return CLI_ERR;
7535 }
7536 sqlite3_bind_text(stmt, SQL_PARAM_1, key, SQL_NUL_TERM, cbm_sqlite_transient);
7537
7538 int rc = sqlite3_step(stmt) == SQLITE_DONE ? 0 : CLI_ERR;
7539 sqlite3_finalize(stmt);
7540 return rc;
7541}
7542
7543/* Whether the background watcher subsystem should run (default true). The
7544 * daemon host gates watcher construction and thread startup on this; see

Callers 3

cbm_cmd_configFunction · 0.85
test_cli.cFile · 0.85
test_mcp.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected