mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-12-29 12:37:40 +01:00
Use case insensitive LIKE command on H2 databases (#2760)
This commit is contained in:
parent
39a5ccf9a9
commit
17f67f6e13
@ -83,6 +83,6 @@ public class H2ConnectionFactory extends FlatfileConnectionFactory {
|
||||
|
||||
@Override
|
||||
public Function<String, String> getStatementProcessor() {
|
||||
return s -> s.replace("'", "`");
|
||||
return s -> s.replace('\'', '`').replace("LIKE", "ILIKE");
|
||||
}
|
||||
}
|
||||
|
@ -76,6 +76,6 @@ public class SqliteConnectionFactory extends FlatfileConnectionFactory {
|
||||
|
||||
@Override
|
||||
public Function<String, String> getStatementProcessor() {
|
||||
return s -> s.replace("'", "`");
|
||||
return s -> s.replace('\'', '`');
|
||||
}
|
||||
}
|
||||
|
@ -71,6 +71,6 @@ public class MariaDbConnectionFactory extends HikariConnectionFactory {
|
||||
|
||||
@Override
|
||||
public Function<String, String> getStatementProcessor() {
|
||||
return s -> s.replace("'", "`"); // use backticks for quotes
|
||||
return s -> s.replace('\'', '`'); // use backticks for quotes
|
||||
}
|
||||
}
|
||||
|
@ -105,6 +105,6 @@ public class MySqlConnectionFactory extends HikariConnectionFactory {
|
||||
|
||||
@Override
|
||||
public Function<String, String> getStatementProcessor() {
|
||||
return s -> s.replace("'", "`"); // use backticks for quotes
|
||||
return s -> s.replace('\'', '`'); // use backticks for quotes
|
||||
}
|
||||
}
|
||||
|
@ -68,6 +68,6 @@ public class PostgreConnectionFactory extends HikariConnectionFactory {
|
||||
|
||||
@Override
|
||||
public Function<String, String> getStatementProcessor() {
|
||||
return s -> s.replace("'", "\"");
|
||||
return s -> s.replace('\'', '"');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user