Fix for #140 - Add some support for RawSql findRowCount, remove BeanCollection.hasMoreRows()

This commit is contained in:
Rob Bygrave
2014-06-10 23:52:05 +12:00
parent db17ddd069
commit af6dbd0dbe
19 changed files with 148 additions and 166 deletions
@@ -115,8 +115,6 @@ public class DefaultRelationalQueryEngine implements RelationalQueryEngine {
maxRows = query.getMaxRows();
}
boolean hasHitMaxRows = false;
int loadRowCount = 0;
SqlQueryListener listener = query.getListener();
@@ -152,7 +150,6 @@ public class DefaultRelationalQueryEngine implements RelationalQueryEngine {
if (loadRowCount == maxRows) {
// break, as we have hit the max rows to fetch...
hasHitMaxRows = true;
break;
}
}
@@ -160,13 +157,6 @@ public class DefaultRelationalQueryEngine implements RelationalQueryEngine {
BeanCollection<?> beanColl = wrapper.getBeanCollection();
if (hasHitMaxRows) {
if (rset.next()) {
// there are more rows available after the maxRows limit
beanColl.setHasMoreRows(true);
}
}
if (request.isLogSummary()) {
long exeTime = System.currentTimeMillis() - startTime;
String msg = "SqlQuery rows[" + loadRowCount + "] time[" + exeTime + "] bind[" + bindLog + "]";