Begin a json-tree {cols, rows} section under `key` on root; returns the * rows array for the caller to fill with column-ordered row arrays. */
| 7994 | /* Begin a json-tree {cols, rows} section under `key` on root; returns the |
| 7995 | * rows array for the caller to fill with column-ordered row arrays. */ |
| 7996 | static yyjson_mut_val *arch_json_section(yyjson_mut_doc *doc, yyjson_mut_val *root, const char *key, |
| 7997 | const char *const *cols, int ncols) { |
| 7998 | yyjson_mut_val *sec = yyjson_mut_obj(doc); |
| 7999 | yyjson_mut_val *c = yyjson_mut_arr(doc); |
| 8000 | for (int i = 0; i < ncols; i++) { |
| 8001 | yyjson_mut_arr_add_str(doc, c, cols[i]); |
| 8002 | } |
| 8003 | yyjson_mut_obj_add_val(doc, sec, "cols", c); |
| 8004 | yyjson_mut_val *rows = yyjson_mut_arr(doc); |
| 8005 | yyjson_mut_obj_add_val(doc, sec, "rows", rows); |
| 8006 | yyjson_mut_obj_add_val(doc, root, key, sec); |
| 8007 | return rows; |
| 8008 | } |
| 8009 | |
| 8010 | /* Fetch the complete qualified_name for a node id, or a "#<id>" fallback. */ |
| 8011 | static char *arch_node_qn(cbm_store_t *store, int64_t id) { |
no outgoing calls
no test coverage detected