| 3076 | } |
| 3077 | |
| 3078 | int cbm_store_coverage_get_scope(cbm_store_t *s, const char *project, const char *scope, |
| 3079 | cbm_coverage_row_t **out, int *count) { |
| 3080 | static const char sql[] = "SELECT rel_path, kind, detail FROM index_coverage " |
| 3081 | "WHERE project = ?1 AND (length(?2) = 0 OR rel_path = ?2 OR " |
| 3082 | " (length(rel_path) > length(?2) " |
| 3083 | " AND substr(rel_path, 1, length(?2)) = ?2 " |
| 3084 | " AND substr(rel_path, length(?2) + 1, 1) = '/') OR " |
| 3085 | " (kind = 'not_indexed_dir' AND length(rel_path) < length(?2) " |
| 3086 | " AND substr(?2, 1, length(rel_path)) = rel_path " |
| 3087 | " AND substr(?2, length(rel_path) + 1, 1) = '/')) " |
| 3088 | "ORDER BY rel_path, kind;"; |
| 3089 | return coverage_query_rows(s, project, scope, sql, out, count); |
| 3090 | } |
| 3091 | |
| 3092 | void cbm_store_coverage_meta_clear(cbm_coverage_meta_t *meta) { |
| 3093 | if (!meta) { |
no test coverage detected