From 983f593231da12bd64d9df23c18d4f2c7aaa6da1 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Tue, 2 Jul 2019 23:12:14 +0200 Subject: SONAR-12246 remove MySQL dialect --- .../src/main/java/org/sonar/db/MyBatis.java | 8 --- .../java/org/sonar/db/component/ComponentDao.java | 4 -- .../org/sonar/db/component/ComponentMapper.java | 2 - .../org/sonar/db/component/ComponentMapper.xml | 8 --- .../ComponentDaoWithDuplicatedKeysTest.java | 70 ---------------------- .../ComponentDaoWithDuplicatedKeysTest/schema.sql | 63 ------------------- 6 files changed, 155 deletions(-) delete mode 100644 server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentDaoWithDuplicatedKeysTest.java delete mode 100644 server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoWithDuplicatedKeysTest/schema.sql (limited to 'server/sonar-db-dao') diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/MyBatis.java b/server/sonar-db-dao/src/main/java/org/sonar/db/MyBatis.java index 4ac08ada7a2..f449a0eeabf 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/MyBatis.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/MyBatis.java @@ -318,14 +318,6 @@ public class MyBatis implements Startable { return newScrollingSelectStatement(session, sql, fetchSize); } - /** - * Create a PreparedStatement for SELECT requests with scrolling of results row by row (only one row - * in memory at a time) - */ - public PreparedStatement newScrollingSingleRowSelectStatement(DbSession session, String sql) { - int fetchSize = database.getDialect().getScrollSingleRowFetchSize(); - return newScrollingSelectStatement(session, sql, fetchSize); - } private static PreparedStatement newScrollingSelectStatement(DbSession session, String sql, int fetchSize) { try { diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentDao.java index 7914cec53e6..b2dfcc5b225 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentDao.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentDao.java @@ -226,10 +226,6 @@ public class ComponentDao implements Dao { return executeLargeInputs(allKeys, subKeys -> mapper(session).selectByKeysAndBranch(subKeys, pullRequestId)); } - public List selectComponentsHavingSameKeyOrderedById(DbSession session, String key) { - return mapper(session).selectComponentsHavingSameKeyOrderedById(key); - } - /** * List of ancestors, ordered from root to parent. The list is empty * if the component is a tree root. Disabled components are excluded by design diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentMapper.java index b8045d385c4..0d4a58ded66 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentMapper.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentMapper.java @@ -142,8 +142,6 @@ public interface ComponentMapper { long countGhostProjects(@Param("organizationUuid") String organizationUuid, @Nullable @Param("query") String query); - List selectComponentsHavingSameKeyOrderedById(String key); - List selectProjectsByNameQuery(@Param("nameQuery") @Nullable String nameQuery, @Param("includeModules") boolean includeModules); void scrollForIndexing(@Param("projectUuid") @Nullable String projectUuid, ResultHandler handler); diff --git a/server/sonar-db-dao/src/main/resources/org/sonar/db/component/ComponentMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/component/ComponentMapper.xml index ef48daaf913..69623715619 100644 --- a/server/sonar-db-dao/src/main/resources/org/sonar/db/component/ComponentMapper.xml +++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/component/ComponentMapper.xml @@ -57,14 +57,6 @@ and pb.branch_type='PULL_REQUEST' - -