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

Function oa_db_nodes

tests/test_openapi.c:176–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176static int oa_db_nodes(const char *db, const char *label, const char *qn) {
177 sqlite3 *h = NULL;
178 int n = 0;
179 if (sqlite3_open_v2(db, &h, SQLITE_OPEN_READONLY, NULL) != SQLITE_OK) {
180 sqlite3_close(h);
181 return -1;
182 }
183 sqlite3_stmt *st = NULL;
184 if (sqlite3_prepare_v2(h, "SELECT count(*) FROM nodes WHERE label = ?1 AND qualified_name = ?2",
185 -1, &st, NULL) == SQLITE_OK) {
186 sqlite3_bind_text(st, 1, label, -1, SQLITE_TRANSIENT);
187 sqlite3_bind_text(st, 2, qn, -1, SQLITE_TRANSIENT);
188 if (sqlite3_step(st) == SQLITE_ROW) {
189 n = sqlite3_column_int(st, 0);
190 }
191 }
192 sqlite3_finalize(st);
193 sqlite3_close(h);
194 return n;
195}
196
197TEST(openapi_graph) {
198 dm_ship_held_families(); /* the operationId family is held until its audit */

Callers 1

test_openapi.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected