Build default 3-column headers (name, qualified_name, label) per variable */
| 4131 | |
| 4132 | /* Build default 3-column headers (name, qualified_name, label) per variable */ |
| 4133 | static void build_default_columns(result_builder_t *rb, const char **vars, int vc) { |
| 4134 | int col_n = vc * CYP_EDGE_COLS; |
| 4135 | const char *col_names[CYP_COL_BUF]; |
| 4136 | for (int v = 0; v < vc; v++) { |
| 4137 | char buf[CBM_SZ_128]; |
| 4138 | snprintf(buf, sizeof(buf), "%s.name", vars[v]); |
| 4139 | col_names[(size_t)v * CYP_EDGE_COLS] = heap_strdup(buf); |
| 4140 | snprintf(buf, sizeof(buf), "%s.qualified_name", vars[v]); |
| 4141 | col_names[((size_t)v * CYP_EDGE_COLS) + SKIP_ONE] = heap_strdup(buf); |
| 4142 | snprintf(buf, sizeof(buf), "%s.label", vars[v]); |
| 4143 | col_names[((size_t)v * CYP_EDGE_COLS) + PAIR_LEN] = heap_strdup(buf); |
| 4144 | } |
| 4145 | rb_set_columns(rb, col_names, col_n); |
| 4146 | for (int i = 0; i < col_n; i++) { |
| 4147 | safe_str_free(&col_names[i]); |
| 4148 | } |
| 4149 | } |
| 4150 | |
| 4151 | /* Default projection when no RETURN clause */ |
| 4152 | static void execute_default_projection(cbm_pattern_t *pat0, binding_t *bindings, int bind_count, |
no test coverage detected