From 45d580342e46d83e5bcf23c971715831def709fd Mon Sep 17 00:00:00 2001 From: montlikadani Date: Sat, 20 Jul 2019 12:17:21 +0200 Subject: [PATCH] For SQL the truncate is valid command - Supports 1.14.4 --- pom.xml | 2 +- src/main/java/com/gamingmesh/jobs/dao/JobsDAO.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index eb14620c..d1596dc5 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ org.spigotmc spigot-api - 1.14.3-R0.1-SNAPSHOT + 1.14.4-R0.1-SNAPSHOT provided diff --git a/src/main/java/com/gamingmesh/jobs/dao/JobsDAO.java b/src/main/java/com/gamingmesh/jobs/dao/JobsDAO.java index bdf4286b..2dbe45e2 100644 --- a/src/main/java/com/gamingmesh/jobs/dao/JobsDAO.java +++ b/src/main/java/com/gamingmesh/jobs/dao/JobsDAO.java @@ -1034,8 +1034,8 @@ public abstract class JobsDAO { int i = list.size(); try { statement = conns.createStatement(); - if (Jobs.getDBManager().getDbType().toString().equalsIgnoreCase("sqlite")) { - statement.executeUpdate("DELETE from `" + getPrefix() + table + "`"); + if (Jobs.getDBManager().getDbType().toString().equalsIgnoreCase("mysql")) { + statement.executeUpdate("TRUNCATE TABLE `" + getPrefix() + table + "`"); } else { statement.executeUpdate("DELETE from `" + getPrefix() + table + "`"); }