diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2012-12-06 16:31:30 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2012-12-06 16:32:43 +0100 |
commit | c3f19580e8a6dbed77f9462eee3cc4037306d02a (patch) | |
tree | b0b24b849442cae1229be238f40c0805f7800abb /sonar-core/src | |
parent | f09252799644be3b7bb3a852b926386df0c24936 (diff) | |
download | sonarqube-c3f19580e8a6dbed77f9462eee3cc4037306d02a.tar.gz sonarqube-c3f19580e8a6dbed77f9462eee3cc4037306d02a.zip |
SONAR-3825 Fix compatibility with Oracle
Diffstat (limited to 'sonar-core/src')
4 files changed, 1 insertions, 71 deletions
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 index 028fa978ad9..00000000000 --- a/sonar-core/src/main/resources/org/sonar/core/filter/CriterionMapper.xml +++ /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 index 6f55eee3a1e..00000000000 --- a/sonar-core/src/main/resources/org/sonar/core/filter/FilterColumnMapper.xml +++ /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 index 620db8c1f3f..00000000000 --- a/sonar-core/src/main/resources/org/sonar/core/filter/FilterMapper.xml +++ /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> diff --git a/sonar-core/src/main/resources/org/sonar/core/measure/MeasureFilterMapper.xml b/sonar-core/src/main/resources/org/sonar/core/measure/MeasureFilterMapper.xml index ea9823d3b17..713fc15f2e4 100644 --- a/sonar-core/src/main/resources/org/sonar/core/measure/MeasureFilterMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/measure/MeasureFilterMapper.xml @@ -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> |