1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-25 12:05:16 +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>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.14.3-R0.1-SNAPSHOT</version>
<version>1.14.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<!-- MyPet -->

View File

@ -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 + "`");
}