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

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

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

Query.asOf介绍

[英]Perform an 'As of' query using history tables to return the object graph as of a time in the past.

To perform this query the DB must have underlying history tables.
[中]使用历史表执行“截至”查询,以返回过去某个时间的对象图。
要执行此查询,数据库必须有基础历史记录表。

代码示例

代码示例来源:origin: ebean-orm/ebean

@Override
public Query<T> asOf(Timestamp asOf) {
 return query.asOf(asOf);
}

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

@Override
public EbeanQuery<MODEL_TYPE> asOf(Timestamp timestamp) {
  q.asOf(timestamp);
  return this;
}

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

@Override
public EbeanQuery<MODEL_TYPE> asOf(Timestamp timestamp) {
  q.asOf(timestamp);
  qReadOnly.asOf(timestamp);
  return this;
}

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

@Override
public Query<T> asOf(Timestamp asOf) {
 return query.asOf(asOf);
}

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

/**
 * Perform an 'As of' query using history tables to return the object graph
 * as of a time in the past.
 * <p>
 * To perform this query the DB must have underlying history tables.
 * </p>
 *
 * @param asOf the date time in the past at which you want to view the data
 */
public R asOf(Timestamp asOf) {
 query.asOf(asOf);
 return root;
}

代码示例来源:origin: icode/ameba

/**
 * {@inheritDoc}
 */
@Override
public Query<T> asOf(Timestamp asOf) {
  return query().asOf(asOf);
}

代码示例来源:origin: icode/ameba

/**
 * find history as of timestamp
 *
 * @param id   model id
 * @param asOf Timestamp
 * @return history model
 * @throws java.lang.Exception any error
 */
public Response fetchHistoryAsOf(@PathParam("id") URI_ID id,
                 @PathParam("asof") final Timestamp asOf) throws Exception {
  final MODEL_ID mId = tryConvertId(id);
  matchedFetchHistoryAsOf(mId, asOf);
  final Query<MODEL> query = server.find(modelType);
  defaultFindOrderBy(query);
  Object entity = executeTx(t -> {
    configDefaultQuery(query);
    configFetchHistoryAsOfQuery(query, mId, asOf);
    applyUriQuery(query, false);
    MODEL model = query.asOf(asOf).setId(mId).findOne();
    return processFetchedHistoryAsOfModel(mId, model, asOf);
  });
  if (isEmptyEntity(entity)) {
    return Response.noContent().build();
  }
  return Response.ok(entity).build();
}

相关文章

Query类方法