mirror of
https://github.com/GeorgH93/Minepacks.git
synced 2024-12-04 14:03:24 +01:00
Fix typo
This commit is contained in:
parent
3d5f29c1f6
commit
15950f3d04
@ -36,7 +36,7 @@ public MySQL(@NotNull Minepacks plugin, @Nullable ConnectionProvider connectionP
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateQuerysForDialect()
|
||||
protected void updateQueriesForDialect()
|
||||
{
|
||||
queryDeleteOldBackpacks = "DELETE FROM `{TableBackpacks}` WHERE `{FieldBPLastUpdate}` + INTERVAL {VarMaxAge} day < NOW()";
|
||||
queryUpdateBp = queryUpdateBp.replaceAll("\\{NOW}", "NOW()");
|
||||
|
@ -56,7 +56,7 @@ public SQL(@NotNull Minepacks plugin, @NotNull ConnectionProvider connectionProv
|
||||
if(!dataSource.isAvailable()) throw new IllegalStateException("Failed to initialize database connection!");
|
||||
|
||||
loadSettings();
|
||||
buildQuerys();
|
||||
buildQueries();
|
||||
checkDB();
|
||||
checkUUIDs(); // Check if there are user accounts without UUID
|
||||
|
||||
@ -181,7 +181,7 @@ public Connection getConnection() throws SQLException
|
||||
|
||||
protected abstract void checkDB();
|
||||
|
||||
protected final void buildQuerys()
|
||||
protected final void buildQueries()
|
||||
{
|
||||
// Build the SQL querys with placeholders for the table and field names
|
||||
queryGetBP = "SELECT {FieldBPOwner},{FieldBPITS},{FieldBPVersion} FROM {TableBackpacks} INNER JOIN {TablePlayers} ON {TableBackpacks}.{FieldBPOwner}={TablePlayers}.{FieldPlayerID} WHERE {FieldUUID}=?;";
|
||||
@ -203,7 +203,7 @@ protected final void buildQuerys()
|
||||
queryFixUUIDs = "UPDATE {TablePlayers} SET {FieldUUID}=? WHERE {FieldPlayerID}=?;";
|
||||
queryDeleteOldCooldowns = "DELETE FROM {TableCooldowns} WHERE {FieldCDTime}<?;";
|
||||
|
||||
updateQuerysForDialect();
|
||||
updateQueriesForDialect();
|
||||
|
||||
setTableAndFieldNames();
|
||||
}
|
||||
@ -224,7 +224,7 @@ protected void setTableAndFieldNames()
|
||||
queryDeleteOldCooldowns = replacePlaceholders(queryDeleteOldCooldowns);
|
||||
}
|
||||
|
||||
protected abstract void updateQuerysForDialect();
|
||||
protected abstract void updateQueriesForDialect();
|
||||
|
||||
protected String replacePlaceholders(@Language("SQL") String query)
|
||||
{
|
||||
|
@ -68,7 +68,7 @@ protected void loadSettings()
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateQuerysForDialect()
|
||||
protected void updateQueriesForDialect()
|
||||
{
|
||||
queryInsertBp = queryInsertBp.replaceAll("\\) VALUES \\(\\?,\\?,\\?", ",{FieldBPLastUpdate}) VALUES (?,?,?,DATE('now')");
|
||||
queryDeleteOldBackpacks = "DELETE FROM {TableBackpacks} WHERE {FieldBPLastUpdate} < DATE('now', '-{VarMaxAge} days')";
|
||||
|
Loading…
Reference in New Issue
Block a user