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
This commit is contained in:
Rob Bygrave
2018-12-19 16:04:28 +13:00
committed by GitHub
parent e611353163
commit 94591954b3
108 changed files with 1908 additions and 233 deletions
@@ -0,0 +1,36 @@
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;
}
}
}