mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Adjusted Fix for Issue 56 - Using findIterate with MySQL streams the
entire result set at once. This makes the fix specific to the DatabasePlatform and findIterate() or findVisit().
This commit is contained in:
@@ -25,6 +25,8 @@ public class CQueryEngine {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(CQueryEngine.class);
|
||||
|
||||
private final DatabasePlatform dbPlatform;
|
||||
|
||||
private final CQueryBuilder queryBuilder;
|
||||
|
||||
private final BackgroundExecutor backgroundExecutor;
|
||||
@@ -33,6 +35,7 @@ public class CQueryEngine {
|
||||
|
||||
public CQueryEngine(DatabasePlatform dbPlatform, Binder binder, BackgroundExecutor backgroundExecutor) {
|
||||
|
||||
this.dbPlatform = dbPlatform;
|
||||
this.backgroundExecutor = backgroundExecutor;
|
||||
this.queryBuilder = new CQueryBuilder(backgroundExecutor, dbPlatform, binder);
|
||||
}
|
||||
@@ -122,7 +125,7 @@ public class CQueryEngine {
|
||||
|
||||
try {
|
||||
|
||||
if (!cquery.prepareBindExecuteQueryForwardOnly()) {
|
||||
if (!cquery.prepareBindExecuteQueryForwardOnly(dbPlatform.isForwardOnlyHintOnFindIterate())) {
|
||||
// query has been cancelled already
|
||||
logger.trace("Future fetch already cancelled");
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user