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

Function exec_sql

src/store/store.c:162–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 15

init_schemaFunction · 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_begin_bulkFunction · 0.85
cbm_store_end_bulkFunction · 0.85
cbm_store_drop_indexesFunction · 0.85
cbm_store_checkpointFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected