mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-02-02 21:41:28 +01:00
[Fix] SQL Timings only in dev mode
This commit is contained in:
parent
a2b6a3b1e5
commit
6aed02e43b
@ -276,7 +276,9 @@ public abstract class SQLDB extends Database {
|
||||
try {
|
||||
connection = getConnection();
|
||||
// Inject Timings to the statement for benchmarking
|
||||
statement.setTimings(timings);
|
||||
if (config.isTrue(Settings.DEV_MODE)) {
|
||||
statement.setTimings(timings);
|
||||
}
|
||||
try (PreparedStatement preparedStatement = connection.prepareStatement(statement.getSql())) {
|
||||
return statement.execute(preparedStatement);
|
||||
}
|
||||
@ -314,7 +316,9 @@ public abstract class SQLDB extends Database {
|
||||
try {
|
||||
connection = getConnection();
|
||||
// Inject Timings to the statement for benchmarking
|
||||
statement.setTimings(timings);
|
||||
if (config.isTrue(Settings.DEV_MODE)) {
|
||||
statement.setTimings(timings);
|
||||
}
|
||||
try (PreparedStatement preparedStatement = connection.prepareStatement(statement.getSql())) {
|
||||
statement.executeBatch(preparedStatement);
|
||||
}
|
||||
@ -330,7 +334,9 @@ public abstract class SQLDB extends Database {
|
||||
try {
|
||||
connection = getConnection();
|
||||
// Inject Timings to the statement for benchmarking
|
||||
statement.setTimings(timings);
|
||||
if (config.isTrue(Settings.DEV_MODE)) {
|
||||
statement.setTimings(timings);
|
||||
}
|
||||
try (PreparedStatement preparedStatement = connection.prepareStatement(statement.getSql())) {
|
||||
return statement.executeQuery(preparedStatement);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user