#1747 - Refactor io.ebeaninternal.server.query access and remove unused

This commit is contained in:
rob bygrave
2019-07-02 22:37:35 +12:00
parent cd9a43c3ab
commit 2f8a99c304
22 changed files with 45 additions and 147 deletions
@@ -34,8 +34,6 @@ class CQueryUpdate implements SpiProfileTransactionEvent {
*/
private final String sql;
private final String type;
/**
* The statement used to create the resultSet.
*/
@@ -43,8 +41,6 @@ class CQueryUpdate implements SpiProfileTransactionEvent {
private String bindLog;
private long executionTimeMicros;
private int rowCount;
private long profileOffset;
@@ -52,8 +48,7 @@ class CQueryUpdate implements SpiProfileTransactionEvent {
/**
* Create the Sql select based on the request.
*/
CQueryUpdate(String type, OrmQueryRequest<?> request, CQueryPredicates predicates, CQueryPlan queryPlan) {
this.type = type;
CQueryUpdate(OrmQueryRequest<?> request, CQueryPredicates predicates, CQueryPlan queryPlan) {
this.request = request;
this.queryPlan = queryPlan;
this.query = request.getQuery();
@@ -63,19 +58,6 @@ class CQueryUpdate implements SpiProfileTransactionEvent {
query.setGeneratedSql(sql);
}
/**
* Return a summary description of this query.
*/
public String getSummary() {
StringBuilder sb = new StringBuilder(80);
sb.append(type).append(" exeMicros[").append(executionTimeMicros)
.append("] rows[").append(rowCount)
.append("] type[").append(desc.getName())
.append("] predicates[").append(predicates.getLogWhereSql())
.append("] bind[").append(bindLog).append("]");
return sb.toString();
}
/**
* Return the bind log.
*/
@@ -109,7 +91,7 @@ class CQueryUpdate implements SpiProfileTransactionEvent {
bindLog = predicates.bind(pstmt, conn);
rowCount = pstmt.executeUpdate();
executionTimeMicros = (System.nanoTime() - startNano) / 1000L;
long executionTimeMicros = (System.nanoTime() - startNano) / 1000L;
request.slowQueryCheck(executionTimeMicros, rowCount);
if (queryPlan.executionTime(rowCount, executionTimeMicros, null)) {
queryPlan.captureBindForQueryPlan(predicates, executionTimeMicros);