de.greenrobot.dao.query.Query.listLazy()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(134)

本文整理了Java中de.greenrobot.dao.query.Query.listLazy方法的一些代码示例,展示了Query.listLazy的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.listLazy方法的具体详情如下:
包路径:de.greenrobot.dao.query.Query
类名称:Query
方法名:listLazy

Query.listLazy介绍

[英]Executes the query and returns the result as a list that lazy loads the entities on first access. Entities are cached, so accessing the same entity more than once will not result in loading an entity from the underlying cursor again.Make sure to close it to close the underlying cursor.
[中]执行查询并以列表的形式返回结果,第一次访问时延迟加载实体。实体是缓存的,因此多次访问同一实体不会导致再次从基础游标加载实体。确保将其关闭以关闭基础光标。

代码示例

代码示例来源:origin: org.greenrobot/greendao-encryption

/**
 * Shorthand for {@link QueryBuilder#build() build()}.{@link Query#listLazy() listLazy()}; see
 * {@link Query#listLazy()} for details. To execute a query more than once, you should build the query and keep the
 * {@link Query} object for efficiency reasons.
 */
public LazyList<T> listLazy() {
  return build().listLazy();
}

代码示例来源:origin: de.greenrobot/greendao

/**
 * Shorthand for {@link QueryBuilder#build() build()}.{@link Query#listLazy() listLazy()}; see
 * {@link Query#listLazy()} for details. To execute a query more than once, you should build the query and keep the
 * {@link Query} object for efficiency reasons.
 */
public LazyList<T> listLazy() {
  return build().listLazy();
}

相关文章