diff options
author | Stephane Gamard <stephane.gamard@searchbox.com> | 2014-06-16 13:21:25 +0200 |
---|---|---|
committer | Stephane Gamard <stephane.gamard@searchbox.com> | 2014-06-16 13:22:02 +0200 |
commit | 65dd651ea8e3532954e4d73ae82c3b8207f5c571 (patch) | |
tree | 0ba5844041b71c12f5a7f5a13f6b901827f76645 /sonar-core/src/main | |
parent | 17e4a6406eeda852e4ec673b7d9e142c4e9b4d28 (diff) | |
download | sonarqube-65dd651ea8e3532954e4d73ae82c3b8207f5c571.tar.gz sonarqube-65dd651ea8e3532954e4d73ae82c3b8207f5c571.zip |
SONAR-5329 - Rename Log package to Activity
Diffstat (limited to 'sonar-core/src/main')
-rw-r--r-- | sonar-core/src/main/resources/org/sonar/core/activity/db/ActivityMapper.xml | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/sonar-core/src/main/resources/org/sonar/core/activity/db/ActivityMapper.xml b/sonar-core/src/main/resources/org/sonar/core/activity/db/ActivityMapper.xml new file mode 100644 index 00000000000..14e061dbaae --- /dev/null +++ b/sonar-core/src/main/resources/org/sonar/core/activity/db/ActivityMapper.xml @@ -0,0 +1,37 @@ +<?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.activity.db.LogMapper"> + + <insert id="insert" parameterType="Log" useGeneratedKeys="false" lang="raw"> + insert into logs + (created_at, log_type,execution_time_field,user_login,data_field, log_message) + values (#{createdAt}, #{type}, #{executionTime}, #{author}, #{data}, #{message}) + </insert> + + <select id="selectByKey" parameterType="map" resultType="Log" lang="raw"> + SELECT + l.created_at as "createdAt", + l.log_type as "type", + l.execution_time_field as "executionTime", + l.user_login as "author", + l.data_field as "data", + l.log_message as "message" + FROM logs l + WHERE l.created_at=#{key.createdAt} + AND l.user_login=#{key.author} + AND l.log_type=#{key.type} + </select> + + <select id="selectAll" parameterType="map" resultType="Log" lang="raw"> + SELECT + l.created_at as "createdAt", + l.log_type as "type", + l.execution_time_field as "executionTime", + l.user_login as "author", + l.data_field as "data", + l.log_message as "message" + FROM logs l + </select> +</mapper> + |