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

Function cbm_config_delete

src/cli/cli.c:2809–2824  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2807}
2808
2809int cbm_config_delete(cbm_config_t *cfg, const char *key) {
2810 if (!cfg || !key) {
2811 return CLI_ERR;
2812 }
2813
2814 sqlite3_stmt *stmt = NULL;
2815 if (sqlite3_prepare_v2(cfg->db, "DELETE FROM config WHERE key = ?", SQL_NUL_TERM, &stmt,
2816 NULL) != SQLITE_OK) {
2817 return CLI_ERR;
2818 }
2819 sqlite3_bind_text(stmt, SQL_PARAM_1, key, SQL_NUL_TERM, cbm_sqlite_transient);
2820
2821 int rc = sqlite3_step(stmt) == SQLITE_DONE ? 0 : CLI_ERR;
2822 sqlite3_finalize(stmt);
2823 return rc;
2824}
2825
2826/* ── Config CLI subcommand ────────────────────────────────────── */
2827

Callers 2

cbm_cmd_configFunction · 0.85
test_cli.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected