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

Function exec_sql

src/store/store.c:166–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164}
165
166static int exec_sql(cbm_store_t *s, const char *sql) {
167 if (!s || !s->db) {
168 return CBM_STORE_ERR;
169 }
170 char *err = NULL;
171 int rc = sqlite3_exec(s->db, sql, NULL, NULL, &err);
172 if (rc != SQLITE_OK) {
173 snprintf(s->errbuf, sizeof(s->errbuf), "exec: %s", err ? err : "unknown");
174 sqlite3_free(err);
175 return CBM_STORE_ERR;
176 }
177 return CBM_STORE_OK;
178}
179
180/* Safe string: returns "" if NULL. */
181static const char *safe_str(const char *s) {

Callers 15

init_schemaFunction · 0.85
cbm_store_fts_rebuildFunction · 0.85
create_user_indexesFunction · 0.85
configure_pragmasFunction · 0.85
cbm_store_execFunction · 0.85
cbm_store_beginFunction · 0.85
cbm_store_commitFunction · 0.85
cbm_store_rollbackFunction · 0.85
cbm_store_compare_graphsFunction · 0.85
cbm_store_begin_bulkFunction · 0.85
cbm_store_end_bulkFunction · 0.85
cbm_store_drop_indexesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected