Scan a node from current row of stmt. Heap-allocates strings. */
| 1712 | |
| 1713 | /* Scan a node from current row of stmt. Heap-allocates strings. */ |
| 1714 | static void scan_node(sqlite3_stmt *stmt, cbm_node_t *n) { |
| 1715 | n->id = sqlite3_column_int64(stmt, 0); |
| 1716 | n->project = heap_strdup((const char *)sqlite3_column_text(stmt, SKIP_ONE)); |
| 1717 | n->label = heap_strdup((const char *)sqlite3_column_text(stmt, CBM_SZ_2)); |
| 1718 | n->name = heap_strdup((const char *)sqlite3_column_text(stmt, CBM_SZ_3)); |
| 1719 | n->qualified_name = heap_strdup((const char *)sqlite3_column_text(stmt, CBM_SZ_4)); |
| 1720 | n->file_path = heap_strdup((const char *)sqlite3_column_text(stmt, CBM_SZ_5)); |
| 1721 | n->start_line = sqlite3_column_int(stmt, CBM_SZ_6); |
| 1722 | n->end_line = sqlite3_column_int(stmt, CBM_SZ_7); |
| 1723 | n->properties_json = heap_strdup((const char *)sqlite3_column_text(stmt, ST_COL_8)); |
| 1724 | } |
| 1725 | |
| 1726 | int cbm_store_find_node_by_id(cbm_store_t *s, int64_t id, cbm_node_t *out) { |
| 1727 | sqlite3_stmt *stmt = |
no test coverage detected