org.jooq.TableField.lessOrEqual()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(5.0k)|赞(0)|评价(0)|浏览(150)

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

TableField.lessOrEqual介绍

暂无

代码示例

代码示例来源:origin: com.walmartlabs.concord.server/concord-server

void deleteExpiredKeys() {
    tx(tx -> {
      int keys = tx.deleteFrom(API_KEYS)
          .where(API_KEYS.EXPIRED_AT.lessOrEqual(currentTimestamp()))
          .execute();
      log.info("deleteExpiredKeys -> removed {} key(s)", keys);
    });
  }
}

代码示例来源:origin: com.walmartlabs.concord.server/concord-server

public void process(Timestamp cutoff) {
    tx(tx -> {
      int i = tx.deleteFrom(PROCESS_CHECKPOINT_ARCHIVE)
          .where(PROCESS_CHECKPOINT_ARCHIVE.LAST_UPDATED_AT.lessOrEqual(cutoff)
              .and(PROCESS_CHECKPOINT_ARCHIVE.STATUS.eq(ArchivalStatus.IN_PROGRESS.toString())))
          .execute();
      log.info("process -> {} record(s) removed", i);
    });
  }
}

代码示例来源:origin: com.walmartlabs.concord.server/concord-server

public void process(Timestamp cutoff) {
    tx(tx -> {
      int i = tx.deleteFrom(PROCESS_STATE_ARCHIVE)
          .where(PROCESS_STATE_ARCHIVE.LAST_UPDATED_AT.lessOrEqual(cutoff)
              .and(PROCESS_STATE_ARCHIVE.STATUS.eq(ArchivalStatus.IN_PROGRESS.toString())))
          .execute();
      log.info("process -> {} record(s) removed", i);
    });
  }
}

代码示例来源:origin: io.zipkin.java/zipkin-storage-jdbc

.and(ZIPKIN_ANNOTATIONS.A_KEY.in(CLIENT_ADDR, SERVER_RECV, SERVER_ADDR)))
.where(lookback == null ?
  ZIPKIN_SPANS.START_TS.lessOrEqual(endTs) :
  ZIPKIN_SPANS.START_TS.between(endTs - lookback * 1000, endTs))

代码示例来源:origin: io.zipkin.java/spanstore-jdbc

.and(ZIPKIN_ANNOTATIONS.A_KEY.in(CLIENT_ADDR, SERVER_RECV, SERVER_ADDR)))
.where(lookback == null ?
  ZIPKIN_SPANS.START_TS.lessOrEqual(endTs) :
  ZIPKIN_SPANS.START_TS.between(endTs - lookback * 1000, endTs))

代码示例来源:origin: io.zipkin.java/storage-jdbc

.and(ZIPKIN_ANNOTATIONS.A_KEY.in(CLIENT_ADDR, SERVER_RECV, SERVER_ADDR)))
.where(lookback == null ?
  ZIPKIN_SPANS.START_TS.lessOrEqual(endTs) :
  ZIPKIN_SPANS.START_TS.between(endTs - lookback * 1000, endTs))

代码示例来源:origin: org.wikibrainapi/wikibrain-pageview

conditions.add(Tables.PAGEVIEW.NUM_VIEWS.lessOrEqual(pDaoFilter.getMaxNumViews()));
conditions.add(Tables.PAGEVIEW.TSTAMP.lessOrEqual(new Timestamp(pDaoFilter.getEndDate().getMillis())));

代码示例来源:origin: shilad/wikibrain

conditions.add(Tables.PAGEVIEW.NUM_VIEWS.lessOrEqual(pDaoFilter.getMaxNumViews()));
conditions.add(Tables.PAGEVIEW.TSTAMP.lessOrEqual(new Timestamp(pDaoFilter.getEndDate().getMillis())));

代码示例来源:origin: io.zipkin.java/zipkin-storage-mysql

.and(ZIPKIN_ANNOTATIONS.A_KEY.in(CLIENT_SEND, CLIENT_ADDR, SERVER_RECV, SERVER_ADDR, ERROR)))
.where(lookback == null ?
  ZIPKIN_SPANS.START_TS.lessOrEqual(endTs) :
  ZIPKIN_SPANS.START_TS.between(endTs - lookback * 1000, endTs))

代码示例来源:origin: com.walmartlabs.concord.server/concord-server

public List<ApiKeyEntry> poll(int days) {
  return txResult(tx ->
      tx.select(API_KEYS.KEY_ID,
          API_KEYS.KEY_NAME,
          API_KEYS.EXPIRED_AT,
          API_KEYS.USER_ID)
          .from(API_KEYS)
          .where(API_KEYS.EXPIRED_AT.isNotNull()
              .and(currentTimestamp().greaterOrEqual(trunc(API_KEYS.EXPIRED_AT).minus(days))
                  .and(API_KEYS.LAST_NOTIFIED_AT.isNull()
                      .or(API_KEYS.LAST_NOTIFIED_AT.lessOrEqual(API_KEYS.EXPIRED_AT.minus(days))))))
          .fetch(this::toEntry));
}

代码示例来源:origin: com.walmartlabs.concord.server/concord-server

public List<UUID> grabNextCheckpointId(Timestamp ageCutoff, int limit) {
  return txResult(tx -> {
    List<UUID> ids = tx.select(PROCESS_CHECKPOINTS.CHECKPOINT_ID)
        .from(PROCESS_CHECKPOINTS)
        .where(PROCESS_CHECKPOINTS.CHECKPOINT_DATE.lessOrEqual(ageCutoff).and(
            notExists(
            selectFrom(PROCESS_CHECKPOINT_ARCHIVE)
                .where(PROCESS_CHECKPOINT_ARCHIVE.CHECKPOINT_ID.eq(PROCESS_CHECKPOINTS.CHECKPOINT_ID)))))
        .limit(limit)
        .forUpdate()
        .skipLocked()
        .fetch(PROCESS_CHECKPOINTS.CHECKPOINT_ID);
    if (ids.isEmpty()) {
      return ids;
    }
    for (UUID id : ids) {
      tx.insertInto(PROCESS_CHECKPOINT_ARCHIVE)
          .columns(PROCESS_CHECKPOINT_ARCHIVE.CHECKPOINT_ID, PROCESS_CHECKPOINT_ARCHIVE.LAST_UPDATED_AT, PROCESS_CHECKPOINT_ARCHIVE.STATUS)
          .values(value(id), currentTimestamp(), value(ArchivalStatus.IN_PROGRESS.toString()))
          .execute();
    }
    return ids;
  });
}

代码示例来源:origin: com.walmartlabs.concord.server/concord-server

public List<ProcessKey> grabNext(ProcessStatus[] statuses, Timestamp ageCutoff, int limit) {
  return txResult(tx -> {
    List<ProcessKey> keys = tx.select(PROCESS_QUEUE.INSTANCE_ID, PROCESS_QUEUE.CREATED_AT)
        .from(PROCESS_QUEUE)
        .where(PROCESS_QUEUE.CURRENT_STATUS.in(Utils.toString(statuses))
            .and(PROCESS_QUEUE.LAST_UPDATED_AT.lessOrEqual(ageCutoff))
            .andNotExists(selectFrom(PROCESS_STATE_ARCHIVE)
                .where(PROCESS_STATE_ARCHIVE.INSTANCE_ID.eq(PROCESS_QUEUE.INSTANCE_ID))))
        .limit(limit)
        .forUpdate()
        .skipLocked()
        .fetch(r -> new ProcessKey(r.get(PROCESS_QUEUE.INSTANCE_ID), r.get(PROCESS_QUEUE.CREATED_AT)));
    if (keys.isEmpty()) {
      return keys;
    }
    for (ProcessKey k : keys) {
      tx.insertInto(PROCESS_STATE_ARCHIVE)
          .columns(PROCESS_STATE_ARCHIVE.INSTANCE_ID, PROCESS_STATE_ARCHIVE.LAST_UPDATED_AT, PROCESS_STATE_ARCHIVE.STATUS)
          .values(value(k.getInstanceId()), currentTimestamp(), value(ArchivalStatus.IN_PROGRESS.toString()))
          .execute();
    }
    return keys;
  });
}

相关文章