mirror of
https://github.com/lucko/LuckPerms.git
synced 2025-09-02 10:52:37 +02:00
Use case insensitive LIKE command on H2 databases (#2760)
This commit is contained in:
@@ -83,6 +83,6 @@ public class H2ConnectionFactory extends FlatfileConnectionFactory {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Function<String, String> getStatementProcessor() {
|
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
|
@Override
|
||||||
public Function<String, String> getStatementProcessor() {
|
public Function<String, String> getStatementProcessor() {
|
||||||
return s -> s.replace("'", "`");
|
return s -> s.replace('\'', '`');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -71,6 +71,6 @@ public class MariaDbConnectionFactory extends HikariConnectionFactory {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Function<String, String> getStatementProcessor() {
|
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
|
@Override
|
||||||
public Function<String, String> getStatementProcessor() {
|
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
|
@Override
|
||||||
public Function<String, String> getStatementProcessor() {
|
public Function<String, String> getStatementProcessor() {
|
||||||
return s -> s.replace("'", "\"");
|
return s -> s.replace('\'', '"');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user