Scan a node from current row of stmt. Heap-allocates strings. */
| 3124 | |
| 3125 | /* Scan a node from current row of stmt. Heap-allocates strings. */ |
| 3126 | static void scan_node(sqlite3_stmt *stmt, cbm_node_t *n) { |
| 3127 | n->id = sqlite3_column_int64(stmt, 0); |
| 3128 | n->project = heap_strdup((const char *)sqlite3_column_text(stmt, SKIP_ONE)); |
| 3129 | n->label = heap_strdup((const char *)sqlite3_column_text(stmt, CBM_SZ_2)); |
| 3130 | n->name = heap_strdup((const char *)sqlite3_column_text(stmt, CBM_SZ_3)); |
| 3131 | n->qualified_name = heap_strdup((const char *)sqlite3_column_text(stmt, CBM_SZ_4)); |
| 3132 | n->file_path = heap_strdup((const char *)sqlite3_column_text(stmt, CBM_SZ_5)); |
| 3133 | n->start_line = sqlite3_column_int(stmt, CBM_SZ_6); |
| 3134 | n->end_line = sqlite3_column_int(stmt, CBM_SZ_7); |
| 3135 | n->properties_json = heap_strdup((const char *)sqlite3_column_text(stmt, ST_COL_8)); |
| 3136 | } |
| 3137 | |
| 3138 | static const char st_find_node_by_id_sql[] = |
| 3139 | "SELECT id, project, label, name, qualified_name, file_path, " |
no test coverage detected