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

Function rb_add_row

src/cypher/cypher.c:2807–2818  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2805}
2806
2807static void rb_add_row(result_builder_t *rb, const char **values) {
2808 if (rb->row_count >= rb->row_cap) {
2809 rb->row_cap *= PAIR_LEN;
2810 rb->rows = safe_realloc(rb->rows, rb->row_cap * sizeof(const char **));
2811 }
2812 const char **row =
2813 malloc((rb->col_count > 0 ? (size_t)rb->col_count : SKIP_ONE) * sizeof(const char *));
2814 for (int i = 0; i < rb->col_count; i++) {
2815 row[i] = values[i] ? heap_strdup(values[i]) : heap_strdup("");
2816 }
2817 rb->rows[rb->row_count++] = row;
2818}
2819
2820/* ── Main execution ─────────────────────────────────────────────── */
2821

Callers 5

execute_return_starFunction · 0.85
ret_agg_emit_rowFunction · 0.85
execute_return_simpleFunction · 0.85
cbm_cypher_executeFunction · 0.85

Calls 2

safe_reallocFunction · 0.85
heap_strdupFunction · 0.70

Tested by

no test coverage detected