+++ /dev/null
-<?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>
+++ /dev/null
-<?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>
+++ /dev/null
-<?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>
<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>