1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-29 05:55:27 +01:00

For SQL the truncate is valid command

- Supports 1.14.4
This commit is contained in:
montlikadani 2019-07-20 12:17:21 +02:00
parent c188ec8658
commit 45d580342e
2 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,7 @@
<dependency> <dependency>
<groupId>org.spigotmc</groupId> <groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId> <artifactId>spigot-api</artifactId>
<version>1.14.3-R0.1-SNAPSHOT</version> <version>1.14.4-R0.1-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<!-- MyPet --> <!-- MyPet -->

View File

@ -1034,8 +1034,8 @@ public abstract class JobsDAO {
int i = list.size(); int i = list.size();
try { try {
statement = conns.createStatement(); statement = conns.createStatement();
if (Jobs.getDBManager().getDbType().toString().equalsIgnoreCase("sqlite")) { if (Jobs.getDBManager().getDbType().toString().equalsIgnoreCase("mysql")) {
statement.executeUpdate("DELETE from `" + getPrefix() + table + "`"); statement.executeUpdate("TRUNCATE TABLE `" + getPrefix() + table + "`");
} else { } else {
statement.executeUpdate("DELETE from `" + getPrefix() + table + "`"); statement.executeUpdate("DELETE from `" + getPrefix() + table + "`");
} }