| 5006 | } |
| 5007 | |
| 5008 | int cbm_store_coverage_get_scope(cbm_store_t *s, const char *project, const char *scope, |
| 5009 | cbm_coverage_row_t **out, int *count) { |
| 5010 | static const char sql[] = "SELECT rel_path, kind, detail FROM index_coverage " |
| 5011 | "WHERE project = ?1 AND (length(?2) = 0 OR rel_path = ?2 OR " |
| 5012 | " (length(rel_path) > length(?2) " |
| 5013 | " AND substr(rel_path, 1, length(?2)) = ?2 " |
| 5014 | " AND substr(rel_path, length(?2) + 1, 1) = '/') OR " |
| 5015 | " (kind = 'not_indexed_dir' AND length(rel_path) < length(?2) " |
| 5016 | " AND substr(?2, 1, length(rel_path)) = rel_path " |
| 5017 | " AND substr(?2, length(rel_path) + 1, 1) = '/')) " |
| 5018 | "ORDER BY rel_path, kind;"; |
| 5019 | return coverage_query_rows(s, project, scope, sql, out, count); |
| 5020 | } |
| 5021 | |
| 5022 | void cbm_store_coverage_meta_clear(cbm_coverage_meta_t *meta) { |
| 5023 | if (!meta) { |
no test coverage detected