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

Function graph_node_cursor_step

src/store/store.c:1952–1969  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1950}
1951
1952static int graph_node_cursor_step(cbm_store_t *store, graph_node_cursor_t *cursor) {
1953 int rc = sqlite3_step(cursor->stmt);
1954 if (rc == SQLITE_DONE) {
1955 cursor->has_row = false;
1956 return CBM_STORE_OK;
1957 }
1958 if (rc != SQLITE_ROW) {
1959 store_set_error_sqlite(store, "compare node scan");
1960 cursor->has_row = false;
1961 return rc == SQLITE_INTERRUPT ? CBM_STORE_CANCELLED : CBM_STORE_ERR;
1962 }
1963 cursor->identity.qualified_name = safe_str((const char *)sqlite3_column_text(cursor->stmt, 0));
1964 cursor->identity.label = safe_str((const char *)sqlite3_column_text(cursor->stmt, ST_COL_1));
1965 cursor->identity.file_path =
1966 safe_str((const char *)sqlite3_column_text(cursor->stmt, ST_COL_2));
1967 cursor->has_row = true;
1968 return CBM_STORE_OK;
1969}
1970
1971static int graph_edge_cursor_step(cbm_store_t *store, graph_edge_cursor_t *cursor) {
1972 int rc = sqlite3_step(cursor->stmt);

Callers 2

graph_compare_nodesFunction · 0.85

Calls 2

store_set_error_sqliteFunction · 0.85
safe_strFunction · 0.70

Tested by

no test coverage detected