Files
ebean/src/main/java/io/ebeaninternal/server/query/PlatformQueryPlan.java
T
Rob BygraveandGitHub 94591954b3 1476 - Query plan capture, initial wip capturing bind params (#1477)
* 1476 - Query plan capture, initial wip capturing bind params

* No effective change - Reset test default db to H2

* #1476 - Query plan capture, initial wip capturing bind params #1477

Update with consumer

* #1476 - Query plan capture, initial wip capturing bind params #1477

Update with query plan request

* #1476 - Query plan capture, initial wip capturing bind params #1477

Extract interface

* #1476 - Query plan capture, initial wip capturing bind params #1477

Extract interface
2018-12-19 16:04:28 +13:00

37 lines
871 B
Java

package io.ebeaninternal.server.query;
import io.ebean.annotation.Platform;
public final class PlatformQueryPlan {
private static QueryPlanLogger explainLogger = new QueryPlanLoggerExplain();
private static QueryPlanLogger postgresLogger = new QueryPlanLoggerPostgres();
private static QueryPlanLogger sqlServerLogger = new QueryPlanLoggerSqlServer();
private static QueryPlanLogger oracleLogger = new QueryPlanLoggerOracle();
/**
* Returns the logger to log query plans for the given platform.
*/
public static QueryPlanLogger getLogger(Platform platform) {
switch (platform) {
case POSTGRES:
return postgresLogger;
case SQLSERVER:
case SQLSERVER16:
case SQLSERVER17:
return sqlServerLogger;
case ORACLE:
return oracleLogger;
default:
return explainLogger;
}
}
}