mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-10-27 00:02:42 +00:00
#1747 - Refactor io.ebeaninternal.server.query access and remove unused
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user