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

Function cbm_config_set

src/cli/cli.c:7508–7524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7506}
7507
7508int cbm_config_set(cbm_config_t *cfg, const char *key, const char *value) {
7509 if (!cfg || !key || !value) {
7510 return CLI_ERR;
7511 }
7512
7513 sqlite3_stmt *stmt = NULL;
7514 if (sqlite3_prepare_v2(cfg->db, "INSERT OR REPLACE INTO config (key, value) VALUES (?, ?)",
7515 SQL_NUL_TERM, &stmt, NULL) != SQLITE_OK) {
7516 return CLI_ERR;
7517 }
7518 sqlite3_bind_text(stmt, SQL_PARAM_1, key, SQL_NUL_TERM, cbm_sqlite_transient);
7519 sqlite3_bind_text(stmt, SQL_PARAM_2, value, SQL_NUL_TERM, cbm_sqlite_transient);
7520
7521 int rc = sqlite3_step(stmt) == SQLITE_DONE ? 0 : CLI_ERR;
7522 sqlite3_finalize(stmt);
7523 return rc;
7524}
7525
7526int cbm_config_delete(cbm_config_t *cfg, const char *key) {
7527 if (!cfg || !key) {

Callers 13

cbm_cmd_configFunction · 0.85
test_cli.cFile · 0.85
test_mcp.cFile · 0.85
autoindex_limit_probeFunction · 0.85
test_httpd.cFile · 0.85

Calls

no outgoing calls