]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3825 Fix compatibility with Oracle
authorSimon Brandhof <simon.brandhof@gmail.com>
Thu, 6 Dec 2012 15:31:30 +0000 (16:31 +0100)
committerSimon Brandhof <simon.brandhof@gmail.com>
Thu, 6 Dec 2012 15:32:43 +0000 (16:32 +0100)
sonar-core/src/main/resources/org/sonar/core/filter/CriterionMapper.xml [deleted file]
sonar-core/src/main/resources/org/sonar/core/filter/FilterColumnMapper.xml [deleted file]
sonar-core/src/main/resources/org/sonar/core/filter/FilterMapper.xml [deleted file]
sonar-core/src/main/resources/org/sonar/core/measure/MeasureFilterMapper.xml

diff --git a/sonar-core/src/main/resources/org/sonar/core/filter/CriterionMapper.xml b/sonar-core/src/main/resources/org/sonar/core/filter/CriterionMapper.xml
deleted file mode 100644 (file)
index 028fa97..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="org.sonar.core.filter.CriterionMapper">
-
-  <insert id="insert" parameterType="Criterion" useGeneratedKeys="true" keyProperty="id">
-    INSERT INTO criteria (filter_id, family, kee, operator, value, text_value, variation)
-    VALUES (#{filterId}, #{family}, #{key}, #{operator}, #{value},
-     #{textValue}, #{variation})
-  </insert>
-
-  <!-- Oracle -->
-  <insert id="insert" databaseId="oracle" parameterType="Criterion" keyColumn="id" useGeneratedKeys="true" keyProperty="id">
-    <selectKey order="BEFORE" resultType="Long" keyProperty="id">
-      select criteria_seq.NEXTVAL from DUAL
-    </selectKey>
-    INSERT INTO criteria (id, filter_id, family, kee, operator, value, text_value, variation)
-    VALUES (#{id}, #{filterId}, #{family}, #{key}, #{operator}, #{value}, #{textValue}, #{variation})
-  </insert>
-
-</mapper>
diff --git a/sonar-core/src/main/resources/org/sonar/core/filter/FilterColumnMapper.xml b/sonar-core/src/main/resources/org/sonar/core/filter/FilterColumnMapper.xml
deleted file mode 100644 (file)
index 6f55eee..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="org.sonar.core.filter.FilterColumnMapper">
-
-  <insert id="insert" parameterType="FilterColumn" useGeneratedKeys="true" keyProperty="id">
-    INSERT INTO filter_columns (filter_id, family, kee, sort_direction, order_index, variation)
-    VALUES (#{filterId}, #{family}, #{key}, #{sortDirection},
-     #{orderIndex}, #{variation})
-  </insert>
-
-  <!-- Oracle -->
-  <insert id="insert" databaseId="oracle" parameterType="FilterColumn" keyColumn="id" useGeneratedKeys="true" keyProperty ="id">
-    <selectKey order="BEFORE" resultType="Long" keyProperty="id" >
-        select filter_columns_seq.NEXTVAL from DUAL
-    </selectKey>
-    INSERT INTO filter_columns (id, filter_id, family, kee, sort_direction, order_index, variation)
-    VALUES (#{id}, #{filterId}, #{family}, #{key}, #{sortDirection},
-     #{orderIndex}, #{variation})
-  </insert>
-
-</mapper>
diff --git a/sonar-core/src/main/resources/org/sonar/core/filter/FilterMapper.xml b/sonar-core/src/main/resources/org/sonar/core/filter/FilterMapper.xml
deleted file mode 100644 (file)
index 620db8c..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="org.sonar.core.filter.FilterMapper">
-
-  <select id="findFilter" parameterType="string" resultType="Filter">
-    select id, name, kee as "key", user_id as "userId", shared, favourites, resource_id as "resourceId", default_view as "defaultView", page_size as "pageSize", period_index as "periodIndex"
-    from filters WHERE kee=#{id} and user_id is null
-  </select>
-
-  <insert id="insert" parameterType="Filter" useGeneratedKeys="true" keyProperty="id">
-    INSERT INTO filters (name, kee, user_id, shared, favourites, resource_id, default_view, page_size, period_index)
-    VALUES (#{name}, #{key}, #{userId}, #{shared}, #{favourites}, #{resourceId}, #{defaultView},
-     #{pageSize}, #{periodIndex})
-  </insert>
-
-  <!-- Oracle -->
-  <insert id="insert" databaseId="oracle" parameterType="Filter" keyColumn="id" useGeneratedKeys="true" keyProperty ="id">
-    <selectKey order="BEFORE" resultType="Long" keyProperty="id" >
-        select filters_seq.NEXTVAL from DUAL
-    </selectKey>
-    INSERT INTO filters (id, name, kee, user_id, shared, favourites, resource_id, default_view, page_size, period_index)
-    VALUES (#{id}, #{name}, #{key}, #{userId}, #{shared}, #{favourites}, #{resourceId}, #{defaultView},
-     #{pageSize}, #{periodIndex})
-  </insert>
-
-</mapper>
index ea9823d3b1712033195f26821b24957df4b21977..713fc15f2e4af89add2eb4da2de8b1a0a5e487d0 100644 (file)
@@ -18,7 +18,7 @@
     <selectKey order="BEFORE" resultType="Long" keyProperty="id">
       select measure_filters_seq.NEXTVAL from DUAL
     </selectKey>
-    INSERT INTO id, measure_filters (name, user_id, shared, description, data, created_at, updated_at)
+    INSERT INTO measure_filters (id, name, user_id, shared, description, data, created_at, updated_at)
     VALUES (#{id}, #{name}, #{userId}, #{shared}, #{description}, #{data}, #{createdAt}, #{updatedAt})
   </insert>