本文整理了Java中io.ebean.Query.findIterate
方法的一些代码示例,展示了Query.findIterate
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.findIterate
方法的具体详情如下:
包路径:io.ebean.Query
类名称:Query
方法名:findIterate
[英]Execute the query iterating over the results.
Note that findIterate (and findEach and findEachWhile) uses a "per graph" persistence context scope and adjusts jdbc fetch buffer size for large queries. As such it is better to use findList for small queries.
Remember that with QueryIterator you must call QueryIterator#close()when you have finished iterating the results (typically in a finally block).
findEach() and findEachWhile() are preferred to findIterate() as they ensure the jdbc statement and resultSet are closed at the end of the iteration.
This query will execute against the EbeanServer that was used to create it.
Query query =}
}
[中]执行对结果进行迭代的查询。
请注意,FindTerate(以及findEach和findEachWhile)使用“每图”持久性上下文范围,并为大型查询调整jdbc获取缓冲区大小。因此,对于小型查询,最好使用findList。
请记住,使用QueryIterator时,必须在完成迭代结果(通常在finally块中)后调用QueryIterator#close()。
findEach()和findEachWhile()比FindTerate()更受欢迎,因为它们确保jdbc语句和结果集在迭代结束时关闭。
此查询将针对用于创建它的EbeanServer执行。
Query query =}
}
代码示例来源:origin: ebean-orm/ebean
@Override
public QueryIterator<T> findIterate() {
return query.findIterate();
}
代码示例来源:origin: io.ebean/ebean
@Override
public QueryIterator<T> findIterate() {
return query.findIterate();
}
代码示例来源:origin: org.actframework/act-ebean2
@Override
public QueryIterator<MODEL_TYPE> findIterate() {
QueryIterator<MODEL_TYPE> i = q.findIterate();
dao.registerQueryIterator(i);
return i;
}
代码示例来源:origin: io.github.hexagonframework.data/spring-data-ebean
@SuppressWarnings("unchecked")
<E> Stream<E> findStream() {
if (queryType == QUERY) {
return StreamUtils.createStreamFromIterator(((Query<E>) queryInstance).findIterate());
}
throw new IllegalArgumentException("query not supported!");
}
代码示例来源:origin: hexagonframework/spring-data-ebean
@SuppressWarnings("unchecked")
<E> Stream<E> findStream() {
if (queryType == QUERY) {
return StreamUtils.createStreamFromIterator(((Query<E>) queryInstance).findIterate());
}
throw new IllegalArgumentException("query not supported!");
}
代码示例来源:origin: org.actframework/act-ebean
@Override
public QueryIterator<MODEL_TYPE> findIterate() {
QueryIterator<MODEL_TYPE> i = qReadOnly.findIterate();
dao.registerQueryIterator(i);
return i;
}
代码示例来源:origin: io.ebean/ebean-querybean
return query.findIterate();
代码示例来源:origin: org.actframework/act-ebean
public void consume($.Visitor<MODEL_TYPE> visitor) {
QueryIterator<MODEL_TYPE> i = qReadOnly.findIterate();
try {
while (i.hasNext()) {
MODEL_TYPE entity = i.next();
visitor.visit(entity);
}
} finally {
i.close();
}
}
代码示例来源:origin: org.actframework/act-ebean2
public void consume($.Visitor<MODEL_TYPE> visitor) {
QueryIterator<MODEL_TYPE> i = q.findIterate();
try {
while (i.hasNext()) {
MODEL_TYPE entity = i.next();
visitor.visit(entity);
}
} finally {
i.close();
}
}
内容来源于网络,如有侵权,请联系作者删除!