Set all languages elements in lowercase to ease comparison for later use

Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
This commit is contained in:
Louis Vallat 2020-10-28 00:07:35 +01:00
parent ef85f0cdd6
commit df956d42d4

View File

@ -105,11 +105,11 @@ public final class LanguageManager {
String alpha2b, String english, String french) throws SQLException {
String insert = "INSERT INTO languages(alpha3_b, alpha3_t, alpha2, english, french) VALUES(?, ?, ?, ?, ?);";
try (PreparedStatement stmt = connection.prepareStatement(insert)) {
stmt.setString(1, alpha3b);
stmt.setString(2, alpha3t.isBlank() ? null : alpha3t);
stmt.setString(3, alpha2b.isBlank() ? null : alpha2b);
stmt.setString(4, english);
stmt.setString(5, french);
stmt.setString(1, alpha3b.toLowerCase());
stmt.setString(2, alpha3t.isBlank() ? null : alpha3t.toLowerCase());
stmt.setString(3, alpha2b.isBlank() ? null : alpha2b.toLowerCase());
stmt.setString(4, english.toLowerCase());
stmt.setString(5, french.toLowerCase());
stmt.executeUpdate();
}
}