#1238 - Refactor MetaInfoManager - collect query plan stats, fix collection of stats on UpdateQuery

This commit is contained in:
Rob Bygrave committed 2018-01-19 01:07:37 +13:00
1 parent b9ae76d465
commit 07cdf64ece
27 files changed
+355 -108

No files matched your search

@@ -277,14 +277,20 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
return beanDescriptor;
}
public boolean isFindAll() {
return whereExpressions == null && nativeSql == null && rawSql == null;
}
@Override
public void checkIdEqualTo() {
public boolean isFindById() {
if (id == null && whereExpressions != null) {
id = whereExpressions.idEqualTo(beanDescriptor.getIdName());
if (id != null) {
whereExpressions = null;
}
}
return id != null;
}
@Override
@@ -715,6 +721,7 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
DefaultOrmQuery<T> copy = new DefaultOrmQuery<>(beanDescriptor, server, expressionFactory);
copy.m2mIncludeJoin = m2mIncludeJoin;
copy.profilingListener = profilingListener;
copy.profileLocation = profileLocation;
copy.rootTableAlias = rootTableAlias;
copy.distinct = distinct;