mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-17 22:56:28 +00:00
#1345 - Refactor io.ebean.meta.MetaInfoManager API (query execution metrics). Breaking change for people collecting query execution metrics.
This commit is contained in:
1 parent
eda6350d89
commit
85bfe3d03e
79 files changed
+928
-466
No files matched your search
@@ -51,6 +51,7 @@ public class DefaultDtoQuery<T> implements SpiDtoQuery<T> {
|
||||
this.server = server;
|
||||
this.descriptor = descriptor;
|
||||
this.ormQuery = ormQuery;
|
||||
this.label = ormQuery.getLabel();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -65,7 +66,7 @@ public class DefaultDtoQuery<T> implements SpiDtoQuery<T> {
|
||||
|
||||
@Override
|
||||
public String planKey() {
|
||||
return sql+":first"+firstRow+":max"+maxRows;
|
||||
return sql + ":first" + firstRow + ":max" + maxRows;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -96,6 +96,8 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
|
||||
|
||||
private Type type;
|
||||
|
||||
private String label;
|
||||
|
||||
private Mode mode = Mode.NORMAL;
|
||||
|
||||
private Object tenantId;
|
||||
@@ -340,6 +342,17 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Query<T> setLabel(String label) {
|
||||
this.label = label;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAutoTunable() {
|
||||
return nativeSql == null && beanDescriptor.isAutoTunable();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package io.ebeaninternal.server.querydefn;
|
||||
|
||||
import io.ebean.EbeanServer;
|
||||
import io.ebean.Update;
|
||||
import io.ebeaninternal.api.BindParams;
|
||||
import io.ebeaninternal.api.SpiUpdate;
|
||||
|
||||
@@ -23,6 +24,8 @@ public final class DefaultOrmUpdate<T> implements SpiUpdate<T>, Serializable {
|
||||
*/
|
||||
private final String name;
|
||||
|
||||
private String label;
|
||||
|
||||
/**
|
||||
* The parameters used to bind to the sql.
|
||||
*/
|
||||
@@ -137,6 +140,17 @@ public final class DefaultOrmUpdate<T> implements SpiUpdate<T>, Serializable {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Update<T> setLabel(String label) {
|
||||
this.label = label;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUpdateStatement() {
|
||||
return updateStatement;
|
||||
|
||||
@@ -19,6 +19,8 @@ public class DefaultRelationalQuery implements SpiSqlQuery {
|
||||
|
||||
private final transient EbeanServer server;
|
||||
|
||||
private String label;
|
||||
|
||||
private String query;
|
||||
|
||||
private int firstRow;
|
||||
@@ -122,6 +124,17 @@ public class DefaultRelationalQuery implements SpiSqlQuery {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DefaultRelationalQuery setLabel(String label) {
|
||||
this.label = label;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BindParams getBindParams() {
|
||||
return bindParams;
|
||||
|
||||
Reference in new issue
Block a user