mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-15 04:31:34 +01:00
Fix SQL error introduced when 'hidden' was added
This commit is contained in:
parent
001b5a6cc7
commit
b288182e42
@ -76,11 +76,11 @@ public class StoreBooleanProviderTransaction extends Transaction {
|
|||||||
PRIORITY + "=?," +
|
PRIORITY + "=?," +
|
||||||
CONDITION + "=?," +
|
CONDITION + "=?," +
|
||||||
PROVIDED_CONDITION + "=?," +
|
PROVIDED_CONDITION + "=?," +
|
||||||
TAB_ID + "=" + ExtensionTabTable.STATEMENT_SELECT_TAB_ID + "," +
|
TAB_ID + '=' + ExtensionTabTable.STATEMENT_SELECT_TAB_ID + ',' +
|
||||||
ICON_ID + "=" + ExtensionIconTable.STATEMENT_SELECT_ICON_ID +
|
ICON_ID + '=' + ExtensionIconTable.STATEMENT_SELECT_ICON_ID + ',' +
|
||||||
WHERE + PLUGIN_ID + "=" + ExtensionPluginTable.STATEMENT_SELECT_PLUGIN_ID +
|
HIDDEN + "=?" +
|
||||||
AND + PROVIDER_NAME + "=?," +
|
WHERE + PLUGIN_ID + '=' + ExtensionPluginTable.STATEMENT_SELECT_PLUGIN_ID +
|
||||||
HIDDEN + "=?";
|
AND + PROVIDER_NAME + "=?";
|
||||||
|
|
||||||
return new ExecStatement(sql) {
|
return new ExecStatement(sql) {
|
||||||
@Override
|
@Override
|
||||||
@ -106,28 +106,29 @@ public class StoreBooleanProviderTransaction extends Transaction {
|
|||||||
}
|
}
|
||||||
ExtensionTabTable.set3TabValuesToStatement(statement, 6, providerInformation.getTab().orElse("No Tab"), providerInformation.getPluginName(), serverUUID);
|
ExtensionTabTable.set3TabValuesToStatement(statement, 6, providerInformation.getTab().orElse("No Tab"), providerInformation.getPluginName(), serverUUID);
|
||||||
ExtensionIconTable.set3IconValuesToStatement(statement, 9, providerInformation.getIcon());
|
ExtensionIconTable.set3IconValuesToStatement(statement, 9, providerInformation.getIcon());
|
||||||
ExtensionPluginTable.set2PluginValuesToStatement(statement, 12, providerInformation.getPluginName(), serverUUID);
|
statement.setBoolean(12, hidden);
|
||||||
statement.setString(14, providerInformation.getName());
|
ExtensionPluginTable.set2PluginValuesToStatement(statement, 13, providerInformation.getPluginName(), serverUUID);
|
||||||
statement.setBoolean(15, hidden);
|
statement.setString(15, providerInformation.getName());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private Executable insertProvider() {
|
private Executable insertProvider() {
|
||||||
String sql = "INSERT INTO " + TABLE_NAME + "(" +
|
String sql = "INSERT INTO " + TABLE_NAME + '(' +
|
||||||
PROVIDER_NAME + "," +
|
PROVIDER_NAME + ',' +
|
||||||
TEXT + "," +
|
TEXT + ',' +
|
||||||
DESCRIPTION + "," +
|
DESCRIPTION + ',' +
|
||||||
PRIORITY + "," +
|
PRIORITY + ',' +
|
||||||
CONDITION + "," +
|
CONDITION + ',' +
|
||||||
PROVIDED_CONDITION + "," +
|
PROVIDED_CONDITION + ',' +
|
||||||
TAB_ID + "," +
|
HIDDEN + ',' +
|
||||||
ICON_ID + "," +
|
TAB_ID + ',' +
|
||||||
|
ICON_ID + ',' +
|
||||||
PLUGIN_ID +
|
PLUGIN_ID +
|
||||||
") VALUES (?,?,?,?,?,?," +
|
") VALUES (?,?,?,?,?,?,?," +
|
||||||
ExtensionTabTable.STATEMENT_SELECT_TAB_ID + "," +
|
ExtensionTabTable.STATEMENT_SELECT_TAB_ID + ',' +
|
||||||
ExtensionIconTable.STATEMENT_SELECT_ICON_ID + "," +
|
ExtensionIconTable.STATEMENT_SELECT_ICON_ID + ',' +
|
||||||
ExtensionPluginTable.STATEMENT_SELECT_PLUGIN_ID + ", ?)";
|
ExtensionPluginTable.STATEMENT_SELECT_PLUGIN_ID + ')';
|
||||||
return new ExecStatement(sql) {
|
return new ExecStatement(sql) {
|
||||||
@Override
|
@Override
|
||||||
public void prepare(PreparedStatement statement) throws SQLException {
|
public void prepare(PreparedStatement statement) throws SQLException {
|
||||||
@ -151,10 +152,10 @@ public class StoreBooleanProviderTransaction extends Transaction {
|
|||||||
} else {
|
} else {
|
||||||
statement.setNull(6, Types.VARCHAR);
|
statement.setNull(6, Types.VARCHAR);
|
||||||
}
|
}
|
||||||
ExtensionTabTable.set3TabValuesToStatement(statement, 7, providerInformation.getTab().orElse("No Tab"), providerInformation.getPluginName(), serverUUID);
|
statement.setBoolean(7, hidden);
|
||||||
ExtensionIconTable.set3IconValuesToStatement(statement, 10, providerInformation.getIcon());
|
ExtensionTabTable.set3TabValuesToStatement(statement, 8, providerInformation.getTab().orElse("No Tab"), providerInformation.getPluginName(), serverUUID);
|
||||||
ExtensionPluginTable.set2PluginValuesToStatement(statement, 13, providerInformation.getPluginName(), serverUUID);
|
ExtensionIconTable.set3IconValuesToStatement(statement, 11, providerInformation.getIcon());
|
||||||
statement.setBoolean(15, hidden);
|
ExtensionPluginTable.set2PluginValuesToStatement(statement, 14, providerInformation.getPluginName(), serverUUID);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user