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

Function dm_exec

tests/test_doc_mentions.c:9554–9563  ·  view source on GitHub ↗

Run one statement against the database; returns the rows it changed, -1 * when it failed. */

Source from the content-addressed store, hash-verified

9552/* Run one statement against the database; returns the rows it changed, -1
9553 * when it failed. */
9554static int dm_exec(const char *db, const char *sql) {
9555 sqlite3 *h = NULL;
9556 int changed = -1;
9557 if (sqlite3_open_v2(db, &h, SQLITE_OPEN_READWRITE, NULL) == SQLITE_OK &&
9558 sqlite3_exec(h, sql, NULL, NULL, NULL) == SQLITE_OK) {
9559 changed = sqlite3_changes(h);
9560 }
9561 sqlite3_close(h);
9562 return changed;
9563}
9564
9565/* One damaged stored scope (A's row, `find` replaced by `put`): 0 when the
9566 * run that reads it fails visibly and the next one rebuilds; else the step

Callers 3

dm_damaged_scope_runFunction · 0.85
dm_unknown_reason_checksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected