| 1950 | } |
| 1951 | |
| 1952 | static 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 | |
| 1971 | static int graph_edge_cursor_step(cbm_store_t *store, graph_edge_cursor_t *cursor) { |
| 1972 | int rc = sqlite3_step(cursor->stmt); |
no test coverage detected