diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-07-10 09:26:14 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-07-10 09:26:14 +0200 |
commit | 428f75ac81ef18acabd1b6c563a5cd3c089e762d (patch) | |
tree | 0e0461e0adca591cd0299802bc2845afee31b549 /sonar-core | |
parent | a45436dd83948364b2c4fe9234207b304847992c (diff) | |
download | sonarqube-428f75ac81ef18acabd1b6c563a5cd3c089e762d.tar.gz sonarqube-428f75ac81ef18acabd1b6c563a5cd3c089e762d.zip |
Remove lang="raw" in mybatis XML files.
MyBatis 3.2.4 raw is automatically applied if the statement is static.
Diffstat (limited to 'sonar-core')
29 files changed, 93 insertions, 93 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 index 06246058171..0c516fa3f89 100644 --- 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 @@ -3,13 +3,13 @@ <mapper namespace="org.sonar.core.activity.db.ActivityMapper"> - <insert id="insert" parameterType="Activity" useGeneratedKeys="false" lang="raw"> + <insert id="insert" parameterType="Activity" useGeneratedKeys="false" > insert into activities (created_at, log_key, log_type, log_action, user_login, data_field, log_message) values (#{createdAt}, #{key}, #{type}, #{action}, #{author}, #{data}, #{message}) </insert> - <select id="selectAll" parameterType="map" resultType="Activity" lang="raw"> + <select id="selectAll" parameterType="map" resultType="Activity" > SELECT created_at as "createdAt", log_type as "type", diff --git a/sonar-core/src/main/resources/org/sonar/core/dashboard/ActiveDashboardMapper.xml b/sonar-core/src/main/resources/org/sonar/core/dashboard/ActiveDashboardMapper.xml index 013ee97161e..16b9f3cdd74 100644 --- a/sonar-core/src/main/resources/org/sonar/core/dashboard/ActiveDashboardMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/dashboard/ActiveDashboardMapper.xml @@ -3,12 +3,12 @@ <mapper namespace="org.sonar.core.dashboard.ActiveDashboardMapper"> - <insert id="insert" parameterType="ActiveDashboard" keyColumn="id" useGeneratedKeys="true" keyProperty ="id" lang="raw"> + <insert id="insert" parameterType="ActiveDashboard" keyColumn="id" useGeneratedKeys="true" keyProperty ="id" > INSERT INTO active_dashboards (dashboard_id, user_id, order_index) VALUES (#{dashboardId}, #{userId}, #{orderIndex}) </insert> - <select id="selectMaxOrderIndexForNullUser" resultType="Integer" lang="raw"> + <select id="selectMaxOrderIndexForNullUser" resultType="Integer" > SELECT MAX(order_index) FROM active_dashboards WHERE user_id IS NULL diff --git a/sonar-core/src/main/resources/org/sonar/core/dashboard/DashboardMapper.xml b/sonar-core/src/main/resources/org/sonar/core/dashboard/DashboardMapper.xml index e9f4803c394..9c3b1864e02 100644 --- a/sonar-core/src/main/resources/org/sonar/core/dashboard/DashboardMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/dashboard/DashboardMapper.xml @@ -3,12 +3,12 @@ <mapper namespace="org.sonar.core.dashboard.DashboardMapper"> - <select id="selectGlobalDashboard" parameterType="string" resultType="Dashboard" lang="raw"> + <select id="selectGlobalDashboard" parameterType="string" resultType="Dashboard" > select id, user_id as "userId", name, description, column_layout as "columnLayout", shared, is_global, created_at as "createdAt", updated_at as "updatedAt" from dashboards WHERE name=#{id} and user_id is null </select> - <insert id="insert" parameterType="Dashboard" keyColumn="id" useGeneratedKeys="true" keyProperty="id" lang="raw"> + <insert id="insert" parameterType="Dashboard" keyColumn="id" useGeneratedKeys="true" keyProperty="id" > INSERT INTO dashboards (user_id, name, description, column_layout, shared, is_global, created_at, updated_at) VALUES (#{userId}, #{name}, #{description}, #{columnLayout}, #{shared}, #{global}, #{createdAt}, #{updatedAt}) diff --git a/sonar-core/src/main/resources/org/sonar/core/dashboard/WidgetMapper.xml b/sonar-core/src/main/resources/org/sonar/core/dashboard/WidgetMapper.xml index 71bc01cf451..fd37b23df5f 100644 --- a/sonar-core/src/main/resources/org/sonar/core/dashboard/WidgetMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/dashboard/WidgetMapper.xml @@ -3,7 +3,7 @@ <mapper namespace="org.sonar.core.dashboard.WidgetMapper"> - <insert id="insert" parameterType="Widget" keyColumn="id" useGeneratedKeys="true" keyProperty="id" lang="raw"> + <insert id="insert" parameterType="Widget" keyColumn="id" useGeneratedKeys="true" keyProperty="id" > INSERT INTO widgets (dashboard_id, widget_key, name, description, column_index, row_index, configured, created_at, updated_at, resource_id) VALUES (#{dashboardId}, #{key}, #{name}, #{description}, #{columnIndex}, #{rowIndex}, #{configured}, #{createdAt}, #{updatedAt}, #{resourceId}) diff --git a/sonar-core/src/main/resources/org/sonar/core/dashboard/WidgetPropertyMapper.xml b/sonar-core/src/main/resources/org/sonar/core/dashboard/WidgetPropertyMapper.xml index 5ab44a79e62..b9ad3a48dee 100644 --- a/sonar-core/src/main/resources/org/sonar/core/dashboard/WidgetPropertyMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/dashboard/WidgetPropertyMapper.xml @@ -3,7 +3,7 @@ <mapper namespace="org.sonar.core.dashboard.WidgetPropertyMapper"> - <insert id="insert" parameterType="WidgetProperty" keyColumn="id" useGeneratedKeys="true" keyProperty="id" lang="raw"> + <insert id="insert" parameterType="WidgetProperty" keyColumn="id" useGeneratedKeys="true" keyProperty="id" > INSERT INTO widget_properties (widget_id, kee, text_value) VALUES (#{widgetId}, #{key}, #{value}) </insert> diff --git a/sonar-core/src/main/resources/org/sonar/core/dependency/DependencyMapper.xml b/sonar-core/src/main/resources/org/sonar/core/dependency/DependencyMapper.xml index 1ea976a0ea5..dc93ec177f2 100644 --- a/sonar-core/src/main/resources/org/sonar/core/dependency/DependencyMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/dependency/DependencyMapper.xml @@ -3,7 +3,7 @@ <mapper namespace="org.sonar.core.dependency.DependencyMapper"> - <select id="selectAll" resultType="dependency" lang="raw"> + <select id="selectAll" resultType="dependency" > SELECT id, from_snapshot_id as fromSnapshotId, to_snapshot_id as toSnapshotId, dep_usage as "usage" FROM dependencies </select> diff --git a/sonar-core/src/main/resources/org/sonar/core/dependency/ResourceSnapshotMapper.xml b/sonar-core/src/main/resources/org/sonar/core/dependency/ResourceSnapshotMapper.xml index 5377b4f9d20..b84277f4962 100644 --- a/sonar-core/src/main/resources/org/sonar/core/dependency/ResourceSnapshotMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/dependency/ResourceSnapshotMapper.xml @@ -3,7 +3,7 @@ <mapper namespace="org.sonar.core.dependency.ResourceSnapshotMapper"> - <select id="selectAll" resultType="ResourceSnapshot" lang="raw"> + <select id="selectAll" resultType="ResourceSnapshot" > SELECT id, project_id as projectId, version FROM snapshots </select> diff --git a/sonar-core/src/main/resources/org/sonar/core/duplication/DuplicationMapper.xml b/sonar-core/src/main/resources/org/sonar/core/duplication/DuplicationMapper.xml index a2810919e0b..530c1182ebf 100644 --- a/sonar-core/src/main/resources/org/sonar/core/duplication/DuplicationMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/duplication/DuplicationMapper.xml @@ -17,7 +17,7 @@ </if> </select> - <insert id="batchInsert" parameterType="DuplicationUnit" useGeneratedKeys="false" lang="raw"> + <insert id="batchInsert" parameterType="DuplicationUnit" useGeneratedKeys="false" > INSERT INTO duplications_index (snapshot_id, project_snapshot_id, hash, index_in_file, start_line, end_line) VALUES (#{snapshotId}, #{projectSnapshotId}, #{hash}, #{indexInFile}, #{startLine}, #{endLine}) </insert> diff --git a/sonar-core/src/main/resources/org/sonar/core/graph/jdbc/GraphDtoMapper.xml b/sonar-core/src/main/resources/org/sonar/core/graph/jdbc/GraphDtoMapper.xml index d77105ac702..704090274f5 100644 --- a/sonar-core/src/main/resources/org/sonar/core/graph/jdbc/GraphDtoMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/graph/jdbc/GraphDtoMapper.xml @@ -3,13 +3,13 @@ <mapper namespace="org.sonar.core.graph.jdbc.GraphDtoMapper"> - <select id="selectBySnapshot" parameterType="map" resultType="Graph" lang="raw"> + <select id="selectBySnapshot" parameterType="map" resultType="Graph" > SELECT id, resource_id as resourceId, snapshot_id as snapshotId, format, version, perspective, root_vertex_id as rootVertexId, data FROM graphs WHERE snapshot_id = #{sid} AND perspective = #{perspective} </select> - <select id="selectByComponent" parameterType="map" resultType="Graph" lang="raw"> + <select id="selectByComponent" parameterType="map" resultType="Graph" > SELECT g.id, g.resource_id as resourceId, g.snapshot_id as snapshotId, g.format, g.version, g.perspective, g.root_vertex_id as rootVertexId, g.data FROM graphs g, snapshots s WHERE g.perspective = #{perspective} AND g.snapshot_id=s.id AND s.islast=${_true} and s.project_id=( @@ -17,7 +17,7 @@ ) </select> - <insert id="insert" parameterType="Graph" useGeneratedKeys="false" lang="raw"> + <insert id="insert" parameterType="Graph" useGeneratedKeys="false" > insert into graphs (resource_id, snapshot_id, format, version, perspective, root_vertex_id, data, created_at, updated_at) values ( diff --git a/sonar-core/src/main/resources/org/sonar/core/issue/db/ActionPlanMapper.xml b/sonar-core/src/main/resources/org/sonar/core/issue/db/ActionPlanMapper.xml index a41db485e48..1d770735304 100644 --- a/sonar-core/src/main/resources/org/sonar/core/issue/db/ActionPlanMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/issue/db/ActionPlanMapper.xml @@ -18,7 +18,7 @@ p.kee as projectKey </sql> - <insert id="insert" parameterType="ActionPlanIssue" keyColumn="id" useGeneratedKeys="true" keyProperty="id" lang="raw"> + <insert id="insert" parameterType="ActionPlanIssue" keyColumn="id" useGeneratedKeys="true" keyProperty="id" > INSERT INTO action_plans (kee, name, description, user_login, project_id, status, deadline, created_at, updated_at) VALUES (#{kee}, #{name}, #{description}, #{userLogin}, #{projectId}, #{status}, #{deadLine}, #{createdAt}, #{updatedAt}) </insert> diff --git a/sonar-core/src/main/resources/org/sonar/core/issue/db/IssueChangeMapper.xml b/sonar-core/src/main/resources/org/sonar/core/issue/db/IssueChangeMapper.xml index 6cda9b308e5..a38c34e88ae 100644 --- a/sonar-core/src/main/resources/org/sonar/core/issue/db/IssueChangeMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/issue/db/IssueChangeMapper.xml @@ -16,16 +16,16 @@ c.issue_change_creation_date as issueChangeCreationDate </sql> - <insert id="insert" parameterType="IssueChange" useGeneratedKeys="false" keyProperty="id" lang="raw"> + <insert id="insert" parameterType="IssueChange" useGeneratedKeys="false" keyProperty="id" > INSERT INTO issue_changes (kee, issue_key, user_login, change_type, change_data, created_at, updated_at, issue_change_creation_date) VALUES (#{kee}, #{issueKey}, #{userLogin}, #{changeType}, #{changeData}, #{createdAt}, #{updatedAt}, #{issueChangeCreationDate}) </insert> - <delete id="delete" parameterType="string" lang="raw"> + <delete id="delete" parameterType="string" > delete from issue_changes where kee=#{id} </delete> - <update id="update" parameterType="map" lang="raw"> + <update id="update" parameterType="map" > update issue_changes set change_data=#{changeData}, updated_at=#{updatedAt} where kee=#{kee} </update> diff --git a/sonar-core/src/main/resources/org/sonar/core/issue/db/IssueFilterFavouriteMapper.xml b/sonar-core/src/main/resources/org/sonar/core/issue/db/IssueFilterFavouriteMapper.xml index dc774b63048..8f6ca9fef93 100644 --- a/sonar-core/src/main/resources/org/sonar/core/issue/db/IssueFilterFavouriteMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/issue/db/IssueFilterFavouriteMapper.xml @@ -28,11 +28,11 @@ VALUES (#{userLogin}, #{issueFilterId}, current_timestamp) </insert> - <delete id="delete" parameterType="long" lang="raw"> + <delete id="delete" parameterType="long" > delete from issue_filter_favourites where id=#{id} </delete> - <delete id="deleteByFilterId" parameterType="long" lang="raw"> + <delete id="deleteByFilterId" parameterType="long" > delete from issue_filter_favourites where issue_filter_id=#{issueFilterId} </delete> diff --git a/sonar-core/src/main/resources/org/sonar/core/issue/db/IssueFilterMapper.xml b/sonar-core/src/main/resources/org/sonar/core/issue/db/IssueFilterMapper.xml index 2f2cf4980b2..078620f535b 100644 --- a/sonar-core/src/main/resources/org/sonar/core/issue/db/IssueFilterMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/issue/db/IssueFilterMapper.xml @@ -40,12 +40,12 @@ where filters.shared=${_true} </select> - <insert id="insert" parameterType="IssueFilter" keyColumn="id" useGeneratedKeys="true" keyProperty="id" lang="raw"> + <insert id="insert" parameterType="IssueFilter" keyColumn="id" useGeneratedKeys="true" keyProperty="id" > INSERT INTO issue_filters (name, user_login, shared, description, data, created_at, updated_at) VALUES (#{name}, #{userLogin}, #{shared}, #{description}, #{data}, #{createdAt}, #{updatedAt}) </insert> - <update id="update" parameterType="IssueFilter" lang="raw"> + <update id="update" parameterType="IssueFilter" > update issue_filters set name=#{name}, shared=#{shared}, @@ -56,7 +56,7 @@ where id=#{id} </update> - <delete id="delete" parameterType="long" lang="raw"> + <delete id="delete" parameterType="long" > delete from issue_filters where id=#{id} </delete> diff --git a/sonar-core/src/main/resources/org/sonar/core/issue/db/IssueMapper.xml b/sonar-core/src/main/resources/org/sonar/core/issue/db/IssueMapper.xml index 2c4ef44b041..2e26a8c6799 100644 --- a/sonar-core/src/main/resources/org/sonar/core/issue/db/IssueMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/issue/db/IssueMapper.xml @@ -60,7 +60,7 @@ </if> </sql> - <insert id="insert" parameterType="Issue" useGeneratedKeys="false" keyProperty="id" lang="raw"> + <insert id="insert" parameterType="Issue" useGeneratedKeys="false" keyProperty="id" > INSERT INTO issues (kee, component_id, root_component_id, rule_id, action_plan_key, severity, manual_severity, message, line, effort_to_fix, technical_debt, status, resolution, checksum, reporter, assignee, author_login, issue_attributes, issue_creation_date, issue_update_date, @@ -74,7 +74,7 @@ <!-- IMPORTANT - invariant columns can't be updated. See IssueDto#toDtoForUpdate() --> - <update id="update" parameterType="Issue" lang="raw"> + <update id="update" parameterType="Issue" > update issues set action_plan_key=#{actionPlanKey}, severity=#{severity}, @@ -101,7 +101,7 @@ <!-- IMPORTANT - invariant columns can't be updated. See IssueDto#toDtoForUpdate() --> - <update id="updateIfBeforeSelectedDate" parameterType="Issue" lang="raw"> + <update id="updateIfBeforeSelectedDate" parameterType="Issue" > update issues set action_plan_key=#{actionPlanKey}, severity=#{severity}, @@ -135,7 +135,7 @@ where i.kee=#{kee} </select> - <select id="selectNonClosedIssuesByModule" parameterType="int" resultType="Issue" lang="raw"> + <select id="selectNonClosedIssuesByModule" parameterType="int" resultType="Issue" > select i.id, i.kee as kee, diff --git a/sonar-core/src/main/resources/org/sonar/core/measure/db/MeasureFilterMapper.xml b/sonar-core/src/main/resources/org/sonar/core/measure/db/MeasureFilterMapper.xml index 6a762f01ffd..0ed22491088 100644 --- a/sonar-core/src/main/resources/org/sonar/core/measure/db/MeasureFilterMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/measure/db/MeasureFilterMapper.xml @@ -3,12 +3,12 @@ <mapper namespace="org.sonar.core.measure.db.MeasureFilterMapper"> - <select id="findSystemFilterByName" parameterType="string" resultType="MeasureFilter" lang="raw"> + <select id="findSystemFilterByName" parameterType="string" resultType="MeasureFilter" > select id, name, user_id as "userId", shared, description, data, created_at as "createdAt", updated_at as "updatedAt" from measure_filters WHERE user_id is null and name=#{id} </select> - <insert id="insert" parameterType="MeasureFilter" keyColumn="id" useGeneratedKeys="true" keyProperty="id" lang="raw"> + <insert id="insert" parameterType="MeasureFilter" keyColumn="id" useGeneratedKeys="true" keyProperty="id" > INSERT INTO measure_filters (name, user_id, shared, description, data, created_at, updated_at) VALUES (#{name}, #{userId}, #{shared}, #{description}, #{data}, #{createdAt}, #{updatedAt}) </insert> diff --git a/sonar-core/src/main/resources/org/sonar/core/notification/db/NotificationQueueMapper.xml b/sonar-core/src/main/resources/org/sonar/core/notification/db/NotificationQueueMapper.xml index ce373be4106..d1dbc9b0875 100644 --- a/sonar-core/src/main/resources/org/sonar/core/notification/db/NotificationQueueMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/notification/db/NotificationQueueMapper.xml @@ -4,20 +4,20 @@ <mapper namespace="org.sonar.core.notification.db.NotificationQueueMapper"> - <insert id="insert" parameterType="NotificationQueue" useGeneratedKeys="false" lang="raw"> + <insert id="insert" parameterType="NotificationQueue" useGeneratedKeys="false" > INSERT INTO notifications (data) VALUES (#{data}) </insert> - <delete id="delete" parameterType="long" lang="raw"> + <delete id="delete" parameterType="long" > delete from notifications where id=#{id} </delete> - <select id="count" resultType="long" lang="raw"> + <select id="count" resultType="long" > select count(*) from notifications </select> - <select id="findOldest" parameterType="int" resultType="NotificationQueue" lang="raw"> + <select id="findOldest" parameterType="int" resultType="NotificationQueue" > select id, data from notifications order by id asc @@ -25,14 +25,14 @@ </select> <!-- SQL Server --> - <select id="findOldest" parameterType="int" resultType="NotificationQueue" databaseId="mssql" lang="raw"> + <select id="findOldest" parameterType="int" resultType="NotificationQueue" databaseId="mssql" > select top (#{count}) id, data from notifications order by id asc </select> <!-- Oracle --> - <select id="findOldest" parameterType="int" resultType="NotificationQueue" databaseId="oracle" lang="raw"> + <select id="findOldest" parameterType="int" resultType="NotificationQueue" databaseId="oracle" > select * from (select id, data from notifications diff --git a/sonar-core/src/main/resources/org/sonar/core/permission/PermissionTemplateMapper.xml b/sonar-core/src/main/resources/org/sonar/core/permission/PermissionTemplateMapper.xml index 70c9ffb08e0..7791fb0aa89 100644 --- a/sonar-core/src/main/resources/org/sonar/core/permission/PermissionTemplateMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/permission/PermissionTemplateMapper.xml @@ -3,45 +3,45 @@ <mapper namespace="org.sonar.core.permission.PermissionTemplateMapper"> - <insert id="insert" parameterType="PermissionTemplate" keyColumn="id" useGeneratedKeys="true" keyProperty="id" lang="raw"> + <insert id="insert" parameterType="PermissionTemplate" keyColumn="id" useGeneratedKeys="true" keyProperty="id" > INSERT INTO permission_templates (name, kee, description, key_pattern, created_at, updated_at) VALUES (#{name}, #{kee}, #{description}, #{keyPattern}, #{createdAt}, #{updatedAt}) </insert> - <update id="update" parameterType="PermissionTemplate" lang="raw"> + <update id="update" parameterType="PermissionTemplate" > UPDATE permission_templates SET name = #{name}, description = #{description}, key_pattern = #{keyPattern}, updated_at = #{updatedAt} WHERE id = #{id} </update> - <delete id="delete" parameterType="long" lang="raw"> + <delete id="delete" parameterType="long" > DELETE FROM permission_templates WHERE id = #{templateId} </delete> - <delete id="deleteUsersPermissions" parameterType="long" lang="raw"> + <delete id="deleteUsersPermissions" parameterType="long" > DELETE FROM perm_templates_users WHERE template_id = #{templateId} </delete> - <delete id="deleteGroupsPermissions" parameterType="long" lang="raw"> + <delete id="deleteGroupsPermissions" parameterType="long" > DELETE FROM perm_templates_groups WHERE template_id = #{templateId} </delete> - <insert id="insertUserPermission" parameterType="PermissionTemplateUser" lang="raw"> + <insert id="insertUserPermission" parameterType="PermissionTemplateUser" > INSERT INTO perm_templates_users (template_id, user_id, permission_reference, created_at, updated_at) VALUES (#{templateId}, #{userId}, #{permission}, #{createdAt}, #{updatedAt}) </insert> - <delete id="deleteUserPermission" parameterType="PermissionTemplateUser" lang="raw"> + <delete id="deleteUserPermission" parameterType="PermissionTemplateUser" > DELETE FROM perm_templates_users WHERE template_id = #{templateId} AND user_id = #{userId} AND permission_reference = #{permission} </delete> - <insert id="insertGroupPermission" parameterType="PermissionTemplateGroup" lang="raw"> + <insert id="insertGroupPermission" parameterType="PermissionTemplateGroup" > INSERT INTO perm_templates_groups (template_id, group_id, permission_reference, created_at, updated_at) VALUES (#{templateId}, #{groupId}, #{permission}, #{createdAt}, #{updatedAt}) </insert> @@ -108,18 +108,18 @@ ORDER BY groups.name </select> - <select id="selectByKey" parameterType="String" resultType="PermissionTemplate" lang="raw"> + <select id="selectByKey" parameterType="String" resultType="PermissionTemplate" > SELECT id, name, kee, description, key_pattern AS keyPattern, created_at AS createdAt, updated_at AS updatedAt FROM permission_templates WHERE kee = #{kee} </select> - <select id="selectAllPermissionTemplates" resultType="PermissionTemplate" lang="raw"> + <select id="selectAllPermissionTemplates" resultType="PermissionTemplate" > SELECT id, name, kee, description, key_pattern AS keyPattern, created_at AS createdAt, updated_at AS updatedAt FROM permission_templates </select> - <select id="selectTemplateUsersPermissions" parameterType="String" resultMap="fullPermissionsTemplateResult" lang="raw"> + <select id="selectTemplateUsersPermissions" parameterType="String" resultMap="fullPermissionsTemplateResult" > SELECT pt.id AS template_id, pt.name AS template_name, pt.description AS template_description, @@ -137,7 +137,7 @@ WHERE pt.kee = #{templateKey} </select> - <select id="selectTemplateGroupsPermissions" parameterType="String" resultMap="fullPermissionsTemplateResult" lang="raw"> + <select id="selectTemplateGroupsPermissions" parameterType="String" resultMap="fullPermissionsTemplateResult" > SELECT pt.id AS template_id, pt.name AS template_name, pt.description AS template_description, diff --git a/sonar-core/src/main/resources/org/sonar/core/persistence/SchemaMigrationMapper.xml b/sonar-core/src/main/resources/org/sonar/core/persistence/SchemaMigrationMapper.xml index be1da205bec..2df5fc4b400 100644 --- a/sonar-core/src/main/resources/org/sonar/core/persistence/SchemaMigrationMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/persistence/SchemaMigrationMapper.xml @@ -3,7 +3,7 @@ <mapper namespace="org.sonar.core.persistence.SchemaMigrationMapper"> - <select id="selectVersions" resultType="int" lang="raw"> + <select id="selectVersions" resultType="int" > select * from schema_migrations </select> diff --git a/sonar-core/src/main/resources/org/sonar/core/persistence/SemaphoreMapper.xml b/sonar-core/src/main/resources/org/sonar/core/persistence/SemaphoreMapper.xml index f4efc01f985..bdd0d86a85d 100644 --- a/sonar-core/src/main/resources/org/sonar/core/persistence/SemaphoreMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/persistence/SemaphoreMapper.xml @@ -3,16 +3,16 @@ <mapper namespace="org.sonar.core.persistence.SemaphoreMapper"> - <insert id="initialize" parameterType="map" useGeneratedKeys="false" lang="raw"> + <insert id="initialize" parameterType="map" useGeneratedKeys="false" > INSERT INTO semaphores (name, checksum, created_at, updated_at, locked_at) VALUES (#{name}, #{checksum}, current_timestamp, current_timestamp, #{lockedAt}) </insert> - <select id="now" resultType="Date" lang="raw"> + <select id="now" resultType="Date" > select current_timestamp </select> - <select id="now" databaseId="oracle" resultType="Date" lang="raw"> + <select id="now" databaseId="oracle" resultType="Date" > select current_timestamp from dual </select> @@ -25,16 +25,16 @@ </if> </update> - <delete id="release" parameterType="String" lang="raw"> + <delete id="release" parameterType="String" > delete from semaphores where name=#{id} </delete> - <select id="selectSemaphore" parameterType="String" resultType="Semaphore" lang="raw"> + <select id="selectSemaphore" parameterType="String" resultType="Semaphore" > select s.id, s.name as name, s.locked_at as lockedAt, s.created_at as createdAt, s.updated_at as updatedAt from semaphores s where s.name=#{name} </select> - <update id="update" parameterType="String" lang="raw"> + <update id="update" parameterType="String" > update semaphores set updated_at = current_timestamp where name=#{name} diff --git a/sonar-core/src/main/resources/org/sonar/core/properties/PropertiesMapper.xml b/sonar-core/src/main/resources/org/sonar/core/properties/PropertiesMapper.xml index 8e1f1645409..250b49a361b 100644 --- a/sonar-core/src/main/resources/org/sonar/core/properties/PropertiesMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/properties/PropertiesMapper.xml @@ -27,13 +27,13 @@ ) </select> - <select id="selectGlobalProperties" resultType="Property" lang="raw"> + <select id="selectGlobalProperties" resultType="Property" > select p.id as id, p.prop_key as "key", p.text_value as value, p.resource_id as resourceId, p.user_id as userId from properties p where p.resource_id is null and p.user_id is null </select> - <select id="selectProjectProperties" parameterType="String" resultType="Property" lang="raw"> + <select id="selectProjectProperties" parameterType="String" resultType="Property" > select p.id as id, p.prop_key as "key", p.text_value as value, p.resource_id as resourceId, p.user_id as userId from properties p, projects r where p.resource_id=r.id and p.user_id is null and r.kee=#{id} @@ -80,20 +80,20 @@ </where> </select> - <update id="update" parameterType="Property" lang="raw"> + <update id="update" parameterType="Property" > update properties set text_value = #{value} where id = #{id} </update> - <insert id="insert" parameterType="Property" useGeneratedKeys="false" lang="raw"> + <insert id="insert" parameterType="Property" useGeneratedKeys="false" > INSERT INTO properties (prop_key, resource_id, user_id, text_value) VALUES (#{key}, #{resourceId}, #{userId}, #{value}) </insert> - <delete id="deleteProjectProperty" parameterType="map" lang="raw"> + <delete id="deleteProjectProperty" parameterType="map" > delete from properties where prop_key=#{key} and resource_id=#{rId} and user_id is null </delete> - <delete id="deleteProjectProperties" parameterType="map" lang="raw"> + <delete id="deleteProjectProperties" parameterType="map" > DELETE FROM properties WHERE prop_key=#{key} @@ -102,23 +102,23 @@ AND user_id IS NULL </delete> - <delete id="deleteGlobalProperty" parameterType="string" lang="raw"> + <delete id="deleteGlobalProperty" parameterType="string" > delete from properties where prop_key=#{id} and resource_id is null and user_id is null </delete> - <delete id="deleteGlobalProperties" lang="raw"> + <delete id="deleteGlobalProperties" > delete from properties where resource_id is null and user_id is null </delete> - <delete id="deleteAllProperties" parameterType="string" lang="raw"> + <delete id="deleteAllProperties" parameterType="string" > delete from properties where prop_key=#{id} </delete> - <update id="renamePropertyKey" parameterType="map" lang="raw"> + <update id="renamePropertyKey" parameterType="map" > update properties set prop_key=#{newKey} where prop_key=#{oldKey} </update> - <update id="updateProperties" parameterType="map" lang="raw"> + <update id="updateProperties" parameterType="map" > update properties set text_value=#{newValue} where text_value LIKE #{oldValue} and prop_key=#{key} </update> diff --git a/sonar-core/src/main/resources/org/sonar/core/qualitygate/db/QualityGateConditionMapper.xml b/sonar-core/src/main/resources/org/sonar/core/qualitygate/db/QualityGateConditionMapper.xml index 600d7ac593e..d4170d89d0f 100644 --- a/sonar-core/src/main/resources/org/sonar/core/qualitygate/db/QualityGateConditionMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/qualitygate/db/QualityGateConditionMapper.xml @@ -3,7 +3,7 @@ <mapper namespace="org.sonar.core.qualitygate.db.QualityGateConditionMapper"> - <insert id="insert" parameterType="QualityGateCondition" keyColumn="id" useGeneratedKeys="true" keyProperty="id" lang="raw"> + <insert id="insert" parameterType="QualityGateCondition" keyColumn="id" useGeneratedKeys="true" keyProperty="id" > insert into quality_gate_conditions (qgate_id, metric_id, operator, value_error, value_warning, period, created_at, updated_at) values (#{qualityGateId}, #{metricId}, #{operator}, #{errorThreshold}, #{warningThreshold}, #{period}, #{createdAt}, #{updatedAt}) </insert> @@ -22,11 +22,11 @@ select <include refid="conditionColumns"/> from quality_gate_conditions where id=#{id} </select> - <update id="delete" parameterType="long" lang="raw"> + <update id="delete" parameterType="long" > delete from quality_gate_conditions where id=#{id} </update> - <update id="update" parameterType="QualityGateCondition" lang="raw"> + <update id="update" parameterType="QualityGateCondition" > update quality_gate_conditions set metric_id=#{metricId}, operator=#{operator}, @@ -37,7 +37,7 @@ where id=#{id} </update> - <delete id="deleteConditionsWithInvalidMetrics" lang="raw"> + <delete id="deleteConditionsWithInvalidMetrics" > delete from quality_gate_conditions where metric_id not in (select id from metrics where enabled=${_true}) </delete> diff --git a/sonar-core/src/main/resources/org/sonar/core/qualitygate/db/QualityGateMapper.xml b/sonar-core/src/main/resources/org/sonar/core/qualitygate/db/QualityGateMapper.xml index 84644a0a6e0..f54a4a8414b 100644 --- a/sonar-core/src/main/resources/org/sonar/core/qualitygate/db/QualityGateMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/qualitygate/db/QualityGateMapper.xml @@ -3,7 +3,7 @@ <mapper namespace="org.sonar.core.qualitygate.db.QualityGateMapper"> - <insert id="insert" parameterType="QualityGate" keyColumn="id" useGeneratedKeys="true" keyProperty="id" lang="raw"> + <insert id="insert" parameterType="QualityGate" keyColumn="id" useGeneratedKeys="true" keyProperty="id" > insert into quality_gates (name, created_at, updated_at) values (#{name}, #{createdAt}, #{updatedAt}) </insert> @@ -27,11 +27,11 @@ where id=#{id} </select> - <update id="delete" parameterType="long" lang="raw"> + <update id="delete" parameterType="long" > delete from quality_gates where id=#{id} </update> - <update id="update" parameterType="QualityGate" lang="raw"> + <update id="update" parameterType="QualityGate" > update quality_gates set name=#{name}, updated_at=#{updatedAt} diff --git a/sonar-core/src/main/resources/org/sonar/core/qualityprofile/db/ActiveRuleMapper.xml b/sonar-core/src/main/resources/org/sonar/core/qualityprofile/db/ActiveRuleMapper.xml index 2f31335b5fd..63c868f2097 100644 --- a/sonar-core/src/main/resources/org/sonar/core/qualityprofile/db/ActiveRuleMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/qualityprofile/db/ActiveRuleMapper.xml @@ -66,7 +66,7 @@ WHERE id=#{id} </update> - <update id="delete" parameterType="int" lang="raw"> + <update id="delete" parameterType="int" > DELETE FROM active_rules WHERE id=#{id} </update> diff --git a/sonar-core/src/main/resources/org/sonar/core/qualityprofile/db/QualityProfileMapper.xml b/sonar-core/src/main/resources/org/sonar/core/qualityprofile/db/QualityProfileMapper.xml index e6ad1eaf7c8..84c2ae5e101 100644 --- a/sonar-core/src/main/resources/org/sonar/core/qualityprofile/db/QualityProfileMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/qualityprofile/db/QualityProfileMapper.xml @@ -14,12 +14,12 @@ p.rules_updated_at as rulesUpdatedAt </sql> - <insert id="insert" parameterType="QualityProfile" keyColumn="id" useGeneratedKeys="true" keyProperty="id" lang="raw"> + <insert id="insert" parameterType="QualityProfile" keyColumn="id" useGeneratedKeys="true" keyProperty="id" > INSERT INTO rules_profiles (kee, parent_kee, name, language, created_at, updated_at, rules_updated_at) VALUES (#{kee}, #{parentKee}, #{name}, #{language}, #{createdAt}, #{updatedAt}, #{rulesUpdatedAt,}) </insert> - <update id="update" parameterType="QualityProfile" lang="raw"> + <update id="update" parameterType="QualityProfile" > UPDATE rules_profiles SET name=#{name}, language=#{language}, @@ -29,7 +29,7 @@ WHERE id=#{id} </update> - <update id="delete" parameterType="int" lang="raw"> + <update id="delete" parameterType="int" > DELETE FROM rules_profiles WHERE id=#{id} </update> diff --git a/sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper.xml b/sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper.xml index 9dc93cb8295..f32095b71da 100644 --- a/sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper.xml @@ -156,7 +156,7 @@ </where> </select> - <select id="selectRootProjectByComponentId" parameterType="long" resultMap="resourceResultMap" lang="raw"> + <select id="selectRootProjectByComponentId" parameterType="long" resultMap="resourceResultMap" > select rootProject.* from snapshots s inner join projects rootProject on rootProject.id=s.root_project_id @@ -235,7 +235,7 @@ </where> </select> - <select id="selectProvisionedProject" parameterType="string" resultMap="resourceResultMap" lang="raw"> + <select id="selectProvisionedProject" parameterType="string" resultMap="resourceResultMap" > select p.* from projects p left join snapshots s on s.project_id=p.id where s.id is null @@ -289,7 +289,7 @@ </where> </sql> - <insert id="insert" parameterType="Resource" keyColumn="id" useGeneratedKeys="true" keyProperty="id" lang="raw"> + <insert id="insert" parameterType="Resource" keyColumn="id" useGeneratedKeys="true" keyProperty="id" > insert into projects (name, long_name, description, scope, qualifier, kee, deprecated_kee, path, language, root_id, copy_resource_id, person_id, enabled, created_at) values ( @@ -299,7 +299,7 @@ ) </insert> - <update id="update" parameterType="Resource" lang="raw"> + <update id="update" parameterType="Resource" > update projects set name=#{name}, long_name=#{longName}, description=#{description}, scope=#{scope}, qualifier=#{qualifier}, kee=#{key}, deprecated_kee=#{deprecatedKey}, path=#{path}, language=#{language}, root_id=#{rootId}, copy_resource_id=#{copyResourceId}, diff --git a/sonar-core/src/main/resources/org/sonar/core/rule/RuleMapper.xml b/sonar-core/src/main/resources/org/sonar/core/rule/RuleMapper.xml index 7fba3960e6e..37a8815edf0 100644 --- a/sonar-core/src/main/resources/org/sonar/core/rule/RuleMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/rule/RuleMapper.xml @@ -124,7 +124,7 @@ #{noteUpdatedAt}, #{createdAt}, #{updatedAt}) </insert> - <delete id="deleteParams" parameterType="Integer" lang="raw"> + <delete id="deleteParams" parameterType="Integer" > delete from active_rule_parameters where rules_parameter_id=#{id} </delete> @@ -159,16 +159,16 @@ WHERE p.rule_id=#{ruleId} AND p.name=#{key} </select> - <delete id="deleteParameter" parameterType="Integer" lang="raw"> + <delete id="deleteParameter" parameterType="Integer" > delete from rules_parameters where id=#{id} </delete> - <insert id="insertParameter" parameterType="RuleParam" keyColumn="id" useGeneratedKeys="true" keyProperty="id" lang="raw"> + <insert id="insertParameter" parameterType="RuleParam" keyColumn="id" useGeneratedKeys="true" keyProperty="id" > INSERT INTO rules_parameters (rule_id, name, param_type, default_value, description) VALUES (#{ruleId}, #{name}, #{type}, #{defaultValue}, #{description}) </insert> - <update id="updateParameter" parameterType="RuleParam" lang="raw"> + <update id="updateParameter" parameterType="RuleParam" > UPDATE rules_parameters SET param_type=#{type}, default_value=#{defaultValue}, @@ -176,7 +176,7 @@ WHERE id=#{id} </update> - <select id="selectKeysOfRulesUpdatedSince" resultType="map" lang="raw"> + <select id="selectKeysOfRulesUpdatedSince" resultType="map" > SELECT r.plugin_name as "repoField", r.plugin_rule_key as "ruleField" FROM rules r WHERE r.updated_at IS NULL or r.updated_at >= #{id} diff --git a/sonar-core/src/main/resources/org/sonar/core/technicaldebt/db/CharacteristicMapper.xml b/sonar-core/src/main/resources/org/sonar/core/technicaldebt/db/CharacteristicMapper.xml index 152832e0366..713a095a03d 100644 --- a/sonar-core/src/main/resources/org/sonar/core/technicaldebt/db/CharacteristicMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/technicaldebt/db/CharacteristicMapper.xml @@ -95,7 +95,7 @@ VALUES (#{kee}, #{name}, #{parentId}, #{characteristicOrder}, #{enabled}, #{createdAt}, #{updatedAt}) </insert> - <update id="update" parameterType="Characteristic" lang="raw"> + <update id="update" parameterType="Characteristic" > update characteristics set name=#{name}, parent_id=#{parentId}, @@ -105,7 +105,7 @@ where id=#{id} </update> - <select id="selectDeprecatedRequirements" resultType="RequirementMigration" lang="raw"> + <select id="selectDeprecatedRequirements" resultType="RequirementMigration" > select id as "id", parent_id as "parentId", root_id as "rootId", @@ -120,7 +120,7 @@ where rule_id IS NOT NULL </select> - <delete id="deleteRequirementsFromCharacteristicsTable" lang="raw"> + <delete id="deleteRequirementsFromCharacteristicsTable" > DELETE FROM characteristics WHERE rule_id IS NOT NULL </delete> </mapper> diff --git a/sonar-core/src/main/resources/org/sonar/core/user/AuthorMapper.xml b/sonar-core/src/main/resources/org/sonar/core/user/AuthorMapper.xml index 1a347fa53dd..f4d03658b08 100644 --- a/sonar-core/src/main/resources/org/sonar/core/user/AuthorMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/user/AuthorMapper.xml @@ -3,17 +3,17 @@ <mapper namespace="org.sonar.core.user.AuthorMapper"> - <select id="selectByLogin" parameterType="string" resultType="Author" lang="raw"> + <select id="selectByLogin" parameterType="string" resultType="Author" > SELECT id, person_id AS personId, login, created_at AS createdAt, updated_at AS updatedAt FROM authors WHERE login=#{id} </select> - <select id="countDeveloperLogins" parameterType="long" resultType="int" lang="raw"> + <select id="countDeveloperLogins" parameterType="long" resultType="int" > SELECT count(id) FROM authors WHERE person_id=#{id} </select> - <insert id="insert" parameterType="Author" keyColumn="id" useGeneratedKeys="true" keyProperty="id" lang="raw"> + <insert id="insert" parameterType="Author" keyColumn="id" useGeneratedKeys="true" keyProperty="id" > INSERT INTO authors (person_id, login, created_at, updated_at) VALUES (#{personId}, #{login}, #{createdAt}, #{updatedAt}) diff --git a/sonar-core/src/main/resources/org/sonar/core/user/RoleMapper.xml b/sonar-core/src/main/resources/org/sonar/core/user/RoleMapper.xml index 8d81b2ccc52..ad7a4b02f21 100644 --- a/sonar-core/src/main/resources/org/sonar/core/user/RoleMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/user/RoleMapper.xml @@ -46,12 +46,12 @@ </where> </select> - <insert id="insertGroupRole" parameterType="GroupRole" keyColumn="id" useGeneratedKeys="true" keyProperty="id" lang="raw"> + <insert id="insertGroupRole" parameterType="GroupRole" keyColumn="id" useGeneratedKeys="true" keyProperty="id" > INSERT INTO group_roles (group_id, resource_id, role) VALUES (#{groupId}, #{resourceId}, #{role}) </insert> - <insert id="insertUserRole" parameterType="UserRole" keyColumn="id" useGeneratedKeys="true" keyProperty="id" lang="raw"> + <insert id="insertUserRole" parameterType="UserRole" keyColumn="id" useGeneratedKeys="true" keyProperty="id" > INSERT INTO user_roles (user_id, resource_id, role) VALUES (#{userId}, #{resourceId}, #{role}) </insert> |