From: Simon Brandhof Date: Fri, 6 Jul 2012 07:27:14 +0000 (+0200) Subject: Add MyBatis RoleMapper for Oracle X-Git-Tag: 3.2~217 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a972fa0b59f2752b6bdfb912beececd280ee14f2;p=sonarqube.git Add MyBatis RoleMapper for Oracle --- diff --git a/sonar-core/src/main/resources/org/sonar/core/user/RoleMapper-oracle.xml b/sonar-core/src/main/resources/org/sonar/core/user/RoleMapper-oracle.xml new file mode 100644 index 00000000000..e77b822bcef --- /dev/null +++ b/sonar-core/src/main/resources/org/sonar/core/user/RoleMapper-oracle.xml @@ -0,0 +1,39 @@ + + + + + + + + select group_roles_seq.NEXTVAL from DUAL + + INSERT INTO group_roles (id, group_id, resource_id, role) + VALUES (#{id}, #{groupId, jdbcType=INTEGER}, #{resourceId, jdbcType=INTEGER}, #{role, jdbcType=VARCHAR}) + + + + + select user_roles_seq.NEXTVAL from DUAL + + INSERT INTO user_roles (id, user_id, resource_id, role) + VALUES (#{id}, #{userId, jdbcType=INTEGER}, #{resourceId, jdbcType=INTEGER}, #{role, jdbcType=VARCHAR}) + + + + delete from group_roles where resource_id=#{id} + + + + delete from user_roles where resource_id=#{id} + + + + + +