io.ebean.Query.fetchQuery()方法的使用及代码示例

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

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

Query.fetchQuery介绍

[英]Fetch the path eagerly using a "query join" (separate SQL query).

This is the same as:

fetch(path, new FetchConfig().query())

This would be used instead of a fetch() when we use a separate SQL query to fetch this part of the object graph rather than a SQL join.

We might typically get a performance benefit when the path to fetch is a OneToMany or ManyToMany, the 'width' of the 'root bean' is wide and the cardinality of the many is high.
[中]使用“查询联接”(单独的SQL查询)急切地获取路径。
这与:

fetch(path, new FetchConfig().query())

当我们使用单独的SQL查询来获取对象图的这一部分而不是SQL连接时,将使用它来代替fetch()。
通常,当获取路径是一个one-tomany或manytomy、根bean的“宽度”很宽且多的基数很高时,我们可能会获得性能优势。

代码示例

代码示例来源:origin: org.actframework/act-ebean2

@Override
public EbeanQuery<MODEL_TYPE> fetchQuery(String path) {
  q.fetchQuery(path);
  return this;
}

代码示例来源:origin: org.actframework/act-ebean

@Override
public EbeanQuery<MODEL_TYPE> fetchQuery(String path, String fetchProperties) {
  q.fetchQuery(path, fetchProperties);
  qReadOnly.fetchQuery(path, fetchProperties);
  return this;
}

代码示例来源:origin: org.actframework/act-ebean

@Override
public EbeanQuery<MODEL_TYPE> fetchQuery(String path) {
  q.fetchQuery(path);
  qReadOnly.fetchQuery(path);
  return this;
}

代码示例来源:origin: org.actframework/act-ebean2

@Override
public EbeanQuery<MODEL_TYPE> fetchQuery(String path, String fetchProperties) {
  q.fetchQuery(path, fetchProperties);
  return this;
}

代码示例来源:origin: io.ebean/ebean-querybean

/**
 * Specify a path to load including all its properties using a "query join".
 *
 * <pre>{@code
 *
 * List<Customer> customers =
 *     new QCustomer()
 *     // eager fetch the contacts using a "query join"
 *     .fetchQuery("contacts")
 *     .findList();
 *
 * }</pre>
 *
 * @param path the property path of an associated (OneToOne, OneToMany, ManyToOne or ManyToMany) bean.
 */
public R fetchQuery(String path) {
 query.fetchQuery(path);
 return root;
}

代码示例来源:origin: io.ebean/ebean-querybean

/**
 * Specify a path and properties to load using a "query join".
 *
 * <pre>{@code
 *
 * List<Customer> customers =
 *     new QCustomer()
 *     // eager fetch contacts using a "query join"
 *     .fetchQuery("contacts", "email, firstName, lastName")
 *     .findList();
 *
 * }</pre>
 *
 * @param path the property path of an associated (OneToOne, OneToMany, ManyToOne or ManyToMany) bean.
 */
public R fetchQuery(String path, String properties) {
 query.fetchQuery(path, properties);
 return root;
}

代码示例来源:origin: io.ebean/ebean-querybean

/**
 * Eagerly fetch this association using a "query join".
 */
public R fetchQuery() {
 ((TQRootBean) _root).query().fetchQuery(_name);
 return _root;
}

代码示例来源:origin: io.ebean/ebean-querybean

/**
 * Eagerly fetch this association using a "query join" with the properties specified.
 */
public R fetchQuery(String properties) {
 ((TQRootBean) _root).query().fetchQuery(_name, properties);
 return _root;
}

代码示例来源:origin: io.ebean/ebean-querybean

/**
 * Eagerly fetch query this association fetching some of the properties.
 */
protected R fetchQueryProperties(TQProperty<?>... props) {
 ((TQRootBean) _root).query().fetchQuery(_name, properties(props));
 return _root;
}

相关文章

Query类方法