compare_graphs deliberately bypasses resolve_store(): it needs two * independently-owned request-scoped read handles, while resolve_store caches * one handle on the server. Direct-name lookup stays the fast path; the * existing internal-name fallback preserves legacy renamed databases. */
| 3103 | * one handle on the server. Direct-name lookup stays the fast path; the |
| 3104 | * existing internal-name fallback preserves legacy renamed databases. */ |
| 3105 | static cbm_store_t *compare_open_project_store(const char *project) { |
| 3106 | char path[CBM_SZ_1K]; |
| 3107 | project_db_path(project, path, sizeof(path)); |
| 3108 | cbm_store_t *store = path[0] ? cbm_store_open_path_query(path) : NULL; |
| 3109 | if (store) { |
| 3110 | cbm_project_t row = {0}; |
| 3111 | if (cbm_store_get_project(store, project, &row) == CBM_STORE_OK) { |
| 3112 | cbm_project_free_fields(&row); |
| 3113 | return store; |
| 3114 | } |
| 3115 | cbm_store_close(store); |
| 3116 | } |
| 3117 | return resolve_store_fallback_scan(project); |
| 3118 | } |
| 3119 | |
| 3120 | typedef struct { |
| 3121 | yyjson_mut_val *items; |
no test coverage detected