From 021cf02cb9813e501349a0840de25f276f243c6e Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Lesaint?= Date: Tue, 9 Jul 2019 17:48:30 +0200 Subject: [PATCH] SONAR-12273 use setNull(Double) for decimal column on all SGDBs --- .../platform/db/migration/step/BaseSqlStatement.java | 8 ++------ .../server/platform/db/migration/step/DataChange.java | 2 +- .../server/platform/db/migration/step/MassUpdate.java | 2 +- .../server/platform/db/migration/step/SelectImpl.java | 7 +++---- .../server/platform/db/migration/step/UpsertImpl.java | 10 ++++------ .../platform/db/migration/step/UpsertImplTest.java | 7 +------ 6 files changed, 12 insertions(+), 24 deletions(-) diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/step/BaseSqlStatement.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/step/BaseSqlStatement.java index e3a3dbcd2e7..cdbe4c88638 100644 --- a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/step/BaseSqlStatement.java +++ b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/step/BaseSqlStatement.java @@ -26,15 +26,11 @@ import java.sql.Types; import java.util.Date; import javax.annotation.Nullable; import org.apache.commons.dbutils.DbUtils; -import org.sonar.db.dialect.Dialect; -import org.sonar.db.dialect.MsSql; class BaseSqlStatement implements SqlStatement { - private final Dialect dialect; protected PreparedStatement pstmt; - protected BaseSqlStatement(Dialect dialect, PreparedStatement pstmt) { - this.dialect = dialect; + protected BaseSqlStatement(PreparedStatement pstmt) { this.pstmt = pstmt; } @@ -99,7 +95,7 @@ class BaseSqlStatement implements SqlStatement implements Select { - private SelectImpl(Dialect dialect, PreparedStatement pstmt) { - super(dialect, pstmt); + private SelectImpl(PreparedStatement pstmt) { + super(pstmt); } @Override @@ -94,6 +93,6 @@ public class SelectImpl extends BaseSqlStatement