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

Function impact_node_exists

src/store/store_impact.c:697–705  ·  view source on GitHub ↗

True when `id` names a node of the walk's project. */

Source from the content-addressed store, hash-verified

695
696/* True when `id` names a node of the walk's project. */
697static bool impact_node_exists(cbm_impact_walk_t *w, int64_t id) {
698 if (!impact_check(w) || !impact_known_id(w, id) || sqlite3_reset(w->stmt_node) != SQLITE_OK ||
699 sqlite3_bind_int64(w->stmt_node, IMPACT_BIND_ID, id) != SQLITE_OK) {
700 return false;
701 }
702 int rc = sqlite3_step(w->stmt_node);
703 int reset = sqlite3_reset(w->stmt_node);
704 return rc == SQLITE_ROW && reset == SQLITE_OK && impact_check(w);
705}
706
707int cbm_impact_walk_add_sinks(cbm_impact_walk_t *w, const int64_t *ids, int count) {
708 if (!impact_check(w) || count < 0 || (count > 0 && !ids)) {

Callers 1

Calls 2

impact_checkFunction · 0.85
impact_known_idFunction · 0.85

Tested by

no test coverage detected