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

Function scan_node

src/store/store.c:1815–1825  ·  view source on GitHub ↗

Scan a node from current row of stmt. Heap-allocates strings. */

Source from the content-addressed store, hash-verified

1813
1814/* Scan a node from current row of stmt. Heap-allocates strings. */
1815static void scan_node(sqlite3_stmt *stmt, cbm_node_t *n) {
1816 n->id = sqlite3_column_int64(stmt, 0);
1817 n->project = heap_strdup((const char *)sqlite3_column_text(stmt, SKIP_ONE));
1818 n->label = heap_strdup((const char *)sqlite3_column_text(stmt, CBM_SZ_2));
1819 n->name = heap_strdup((const char *)sqlite3_column_text(stmt, CBM_SZ_3));
1820 n->qualified_name = heap_strdup((const char *)sqlite3_column_text(stmt, CBM_SZ_4));
1821 n->file_path = heap_strdup((const char *)sqlite3_column_text(stmt, CBM_SZ_5));
1822 n->start_line = sqlite3_column_int(stmt, CBM_SZ_6);
1823 n->end_line = sqlite3_column_int(stmt, CBM_SZ_7);
1824 n->properties_json = heap_strdup((const char *)sqlite3_column_text(stmt, ST_COL_8));
1825}
1826
1827int cbm_store_find_node_by_id(cbm_store_t *s, int64_t id, cbm_node_t *out) {
1828 sqlite3_stmt *stmt =

Callers 10

find_nodes_genericFunction · 0.85
cbm_store_searchFunction · 0.85
cbm_store_bfsFunction · 0.85
cbm_store_bfs_multiFunction · 0.85

Calls 1

heap_strdupFunction · 0.70

Tested by

no test coverage detected