From f128c2dafa50eff8c5d5c94afef561da4d2f7a73 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Lesaint?= Date: Mon, 27 Mar 2017 11:16:35 +0200 Subject: [PATCH] SONAR-8995 a bit of formatting on CeQueueMapper.xml --- .../org/sonar/db/ce/CeQueueMapper.xml | 131 ++++++++++++------ 1 file changed, 86 insertions(+), 45 deletions(-) diff --git a/server/sonar-db-dao/src/main/resources/org/sonar/db/ce/CeQueueMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/ce/CeQueueMapper.xml index ebd64ab82ea..8e03d719f5c 100644 --- a/server/sonar-db-dao/src/main/resources/org/sonar/db/ce/CeQueueMapper.xml +++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/ce/CeQueueMapper.xml @@ -15,45 +15,60 @@ - order by cq.created_at asc, cq.id asc + order by + cq.created_at asc, + cq.id asc - order by cq.created_at desc, cq.id desc + order by + cq.created_at desc, + cq.id desc @@ -65,12 +80,14 @@ - from ce_queue cq + from + ce_queue cq and cq.component_uuid in @@ -94,48 +111,72 @@ insert into ce_queue - (uuid, task_type, component_uuid, status, submitter_login, started_at, created_at, updated_at) + ( + uuid, + task_type, + component_uuid, + status, + submitter_login, + started_at, + created_at, + updated_at + ) values ( - #{uuid,jdbcType=VARCHAR}, - #{taskType,jdbcType=VARCHAR}, - #{componentUuid,jdbcType=VARCHAR}, - #{status,jdbcType=VARCHAR}, - #{submitterLogin,jdbcType=VARCHAR}, - #{startedAt,jdbcType=BIGINT}, - #{createdAt,jdbcType=BIGINT}, - #{updatedAt,jdbcType=BIGINT} + #{uuid,jdbcType=VARCHAR}, + #{taskType,jdbcType=VARCHAR}, + #{componentUuid,jdbcType=VARCHAR}, + #{status,jdbcType=VARCHAR}, + #{submitterLogin,jdbcType=VARCHAR}, + #{startedAt,jdbcType=BIGINT}, + #{createdAt,jdbcType=BIGINT}, + #{updatedAt,jdbcType=BIGINT} ) - update ce_queue - set status='PENDING', started_at=NULL, updated_at=#{updatedAt,jdbcType=BIGINT} - where status <> 'PENDING' + update ce_queue set + status='PENDING', + started_at=NULL, + updated_at=#{updatedAt,jdbcType=BIGINT} + where + status <> 'PENDING' - update ce_queue - set status=#{newStatus,jdbcType=VARCHAR}, - started_at=#{startedAt,jdbcType=BIGINT}, - updated_at=#{updatedAt,jdbcType=BIGINT} - where uuid=#{uuid,jdbcType=VARCHAR} and status=#{oldStatus,jdbcType=VARCHAR} + update ce_queue set + status=#{newStatus,jdbcType=VARCHAR}, + started_at=#{startedAt,jdbcType=BIGINT}, + updated_at=#{updatedAt,jdbcType=BIGINT} + where + uuid=#{uuid,jdbcType=VARCHAR} + and status=#{oldStatus,jdbcType=VARCHAR} - delete from ce_queue where uuid=#{uuid,jdbcType=VARCHAR} + delete from + ce_queue + where + uuid=#{uuid,jdbcType=VARCHAR} -- 2.39.5