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

Function cbm_config_delete

src/cli/cli.c:6720–6735  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6718}
6719
6720int cbm_config_delete(cbm_config_t *cfg, const char *key) {
6721 if (!cfg || !key) {
6722 return CLI_ERR;
6723 }
6724
6725 sqlite3_stmt *stmt = NULL;
6726 if (sqlite3_prepare_v2(cfg->db, "DELETE FROM config WHERE key = ?", SQL_NUL_TERM, &stmt,
6727 NULL) != SQLITE_OK) {
6728 return CLI_ERR;
6729 }
6730 sqlite3_bind_text(stmt, SQL_PARAM_1, key, SQL_NUL_TERM, cbm_sqlite_transient);
6731
6732 int rc = sqlite3_step(stmt) == SQLITE_DONE ? 0 : CLI_ERR;
6733 sqlite3_finalize(stmt);
6734 return rc;
6735}
6736
6737/* ── Config CLI subcommand ────────────────────────────────────── */
6738

Callers 2

cbm_cmd_configFunction · 0.85
test_cli.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected