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

Function cbm_store_coverage_get_scope

src/store/store.c:3171–3183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3169}
3170
3171int cbm_store_coverage_get_scope(cbm_store_t *s, const char *project, const char *scope,
3172 cbm_coverage_row_t **out, int *count) {
3173 static const char sql[] = "SELECT rel_path, kind, detail FROM index_coverage "
3174 "WHERE project = ?1 AND (length(?2) = 0 OR rel_path = ?2 OR "
3175 " (length(rel_path) > length(?2) "
3176 " AND substr(rel_path, 1, length(?2)) = ?2 "
3177 " AND substr(rel_path, length(?2) + 1, 1) = '/') OR "
3178 " (kind = 'not_indexed_dir' AND length(rel_path) < length(?2) "
3179 " AND substr(?2, 1, length(rel_path)) = rel_path "
3180 " AND substr(?2, length(rel_path) + 1, 1) = '/')) "
3181 "ORDER BY rel_path, kind;";
3182 return coverage_query_rows(s, project, scope, sql, out, count);
3183}
3184
3185void cbm_store_coverage_meta_clear(cbm_coverage_meta_t *meta) {
3186 if (!meta) {

Callers 2

test_store_nodes.cFile · 0.85

Calls 1

coverage_query_rowsFunction · 0.85

Tested by

no test coverage detected