From a972fa0b59f2752b6bdfb912beececd280ee14f2 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Fri, 6 Jul 2012 09:27:14 +0200 Subject: [PATCH] Add MyBatis RoleMapper for Oracle --- .../org/sonar/core/user/RoleMapper-oracle.xml | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 sonar-core/src/main/resources/org/sonar/core/user/RoleMapper-oracle.xml 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} + + + + + + -- 2.39.5