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

Function exec_sql

src/store/store.c:152–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152static int exec_sql(cbm_store_t *s, const char *sql) {
153 if (!s || !s->db) {
154 return CBM_STORE_ERR;
155 }
156 char *err = NULL;
157 int rc = sqlite3_exec(s->db, sql, NULL, NULL, &err);
158 if (rc != SQLITE_OK) {
159 snprintf(s->errbuf, sizeof(s->errbuf), "exec: %s", err ? err : "unknown");
160 sqlite3_free(err);
161 return CBM_STORE_ERR;
162 }
163 return CBM_STORE_OK;
164}
165
166/* Safe string: returns "" if NULL. */
167static const char *safe_str(const char *s) {

Callers 13

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