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:
parent
ef85f0cdd6
commit
df956d42d4
@ -105,11 +105,11 @@ public final class LanguageManager {
|
|||||||
String alpha2b, String english, String french) throws SQLException {
|
String alpha2b, String english, String french) throws SQLException {
|
||||||
String insert = "INSERT INTO languages(alpha3_b, alpha3_t, alpha2, english, french) VALUES(?, ?, ?, ?, ?);";
|
String insert = "INSERT INTO languages(alpha3_b, alpha3_t, alpha2, english, french) VALUES(?, ?, ?, ?, ?);";
|
||||||
try (PreparedStatement stmt = connection.prepareStatement(insert)) {
|
try (PreparedStatement stmt = connection.prepareStatement(insert)) {
|
||||||
stmt.setString(1, alpha3b);
|
stmt.setString(1, alpha3b.toLowerCase());
|
||||||
stmt.setString(2, alpha3t.isBlank() ? null : alpha3t);
|
stmt.setString(2, alpha3t.isBlank() ? null : alpha3t.toLowerCase());
|
||||||
stmt.setString(3, alpha2b.isBlank() ? null : alpha2b);
|
stmt.setString(3, alpha2b.isBlank() ? null : alpha2b.toLowerCase());
|
||||||
stmt.setString(4, english);
|
stmt.setString(4, english.toLowerCase());
|
||||||
stmt.setString(5, french);
|
stmt.setString(5, french.toLowerCase());
|
||||||
stmt.executeUpdate();
|
stmt.executeUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user