diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2017-01-24 14:55:29 +0100 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2017-01-24 17:37:23 +0100 |
commit | f55c90fa06e82cd70639eda3c2a6f686a13fbee7 (patch) | |
tree | 6dbcb0d7462aec99c2412e77aebafb0210d24ac1 /sonar-db/src/main/resources/org/sonar/db | |
parent | a9c56c11f9889888311e1be3a1a100321c3f1ac0 (diff) | |
download | sonarqube-f55c90fa06e82cd70639eda3c2a6f686a13fbee7.tar.gz sonarqube-f55c90fa06e82cd70639eda3c2a6f686a13fbee7.zip |
SONAR-7305 Create WS api/measures/search_history
Diffstat (limited to 'sonar-db/src/main/resources/org/sonar/db')
-rw-r--r-- | sonar-db/src/main/resources/org/sonar/db/measure/MeasureMapper.xml | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sonar-db/src/main/resources/org/sonar/db/measure/MeasureMapper.xml b/sonar-db/src/main/resources/org/sonar/db/measure/MeasureMapper.xml index 9b5900bba35..c56d91b0cb5 100644 --- a/sonar-db/src/main/resources/org/sonar/db/measure/MeasureMapper.xml +++ b/sonar-db/src/main/resources/org/sonar/db/measure/MeasureMapper.xml @@ -128,7 +128,7 @@ <include refid="org.sonar.db.component.ComponentMapper.selectDescendantsFilters"/> </sql> - <select id="selectPastMeasures" parameterType="map" resultType="org.sonar.db.measure.PastMeasureDto"> + <select id="selectPastMeasuresOnSingleAnalysis" parameterType="map" resultType="org.sonar.db.measure.PastMeasureDto"> select pm.id as id, pm.metric_id as metricId, pm.person_id as personId, pm.value as value from project_measures pm inner join snapshots analysis on analysis.uuid = pm.analysis_uuid @@ -139,6 +139,17 @@ and pm.person_id is null </select> + <select id="selectPastMeasuresOnSeveralAnalyses" parameterType="map" resultType="Measure"> + select <include refid="measureColumns"/> + from project_measures pm + inner join snapshots analysis on analysis.uuid = pm.analysis_uuid + where + pm.component_uuid = #{componentUuid} + and analysis.uuid in <foreach item="analysisUuid" collection="analysisUuids" open="(" separator="," close=")">#{analysisUuid}</foreach> + and pm.metric_id in <foreach item="metricId" collection="metricIds" open="(" separator="," close=")">#{metricId}</foreach> + and pm.person_id is null + </select> + <select id="selectProjectMeasuresOfDeveloper" parameterType="map" resultType="Measure"> SELECT <include refid="measureColumns"/> |