本文整理了Java中org.jooq.TableField.lt()
方法的一些代码示例,展示了TableField.lt()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableField.lt()
方法的具体详情如下:
包路径:org.jooq.TableField
类名称:TableField
方法名:lt
暂无
代码示例来源:origin: com.gitee.hengboy/micro-job-common
/**
* 查询心跳检查过期的节点编号集合
*
* @return 过期节点的编号集合
*/
public List<Integer> selectTimeOutNodes(int heartCheckOverTime) {
return dslContext.selectFrom(JOB_NODE_INFO)
.where(JobNodeInfo.JNI_LAST_HEART_TIME.lt(new Timestamp(System.currentTimeMillis() - (heartCheckOverTime * 1000))))
.fetch(JobNodeInfo.JNI_ID);
}
代码示例来源:origin: rancher/cattle
public void purgeOld() {
int deleted = create()
.delete(TASK_INSTANCE)
.where(
TASK_INSTANCE.START_TIME.lt(new Date(System.currentTimeMillis() - AFTER_SECONDS.get() * 1000)))
.execute();
if ( deleted > 0 ) {
log.info("Deleted [{}] task instance records", deleted);
}
}
代码示例来源:origin: rancher/cattle
@Override
public void setIfOlder(Client client, String itemName, Long version) {
create()
.update(CONFIG_ITEM_STATUS)
.set(CONFIG_ITEM_STATUS.REQUESTED_VERSION, version)
.set(CONFIG_ITEM_STATUS.REQUESTED_UPDATED, new Timestamp(System.currentTimeMillis()))
.where(
CONFIG_ITEM_STATUS.REQUESTED_VERSION.lt(version)
.and(CONFIG_ITEM_STATUS.NAME.eq(itemName))
.and(targetObjectCondition(client))).execute();
}
代码示例来源:origin: rancher/cattle
@Override
public List<? extends Host> findHostsRemove() {
if (startTime == null) {
startTime = System.currentTimeMillis();
}
if ((System.currentTimeMillis() - startTime) <= (HOST_REMOVE_START_DELAY.get() * 1000)) {
return Collections.emptyList();
}
return create().select(HOST.fields())
.from(HOST)
.join(AGENT)
.on(AGENT.ID.eq(HOST.AGENT_ID))
.join(ACCOUNT)
.on(ACCOUNT.ID.eq(HOST.ACCOUNT_ID))
.where(AGENT.STATE.eq(AgentConstants.STATE_DISCONNECTED)
.and(HOST.STATE.in(CommonStatesConstants.ACTIVE, CommonStatesConstants.INACTIVE))
.and(HOST.REMOVE_AFTER.lt(new Date())))
.fetchInto(HostRecord.class);
}
}
代码示例来源:origin: rancher/cattle
private void cleanupExternalHandlerExternalHandlerProcessMapTables(Date cutoff) {
ResultQuery<Record1<Long>> ids = create()
.select(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP.ID)
.from(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP)
.join(EXTERNAL_HANDLER)
.on(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP.EXTERNAL_HANDLER_ID.eq(EXTERNAL_HANDLER.ID))
.where(EXTERNAL_HANDLER.REMOVED.lt(cutoff))
.limit(QUERY_LIMIT_ROWS.getValue());
List<Long> toDelete = null;
int rowsDeleted = 0;
while ((toDelete = ids.fetch().into(Long.class)).size() > 0) {
rowsDeleted += create().delete(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP)
.where(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP.ID.in(toDelete)).execute();
}
if (rowsDeleted > 0) {
log.info("[Rows Deleted] external_handler_external_handler_process_map={}", rowsDeleted);
}
}
代码示例来源:origin: rancher/cattle
private void cleanupServiceEventTable(Date cutoff) {
ResultQuery<Record1<Long>> ids = create()
.select(SERVICE_EVENT.ID)
.from(SERVICE_EVENT)
.where(SERVICE_EVENT.CREATED.lt(cutoff))
.and(SERVICE_EVENT.STATE.eq(CommonStatesConstants.CREATED))
.limit(QUERY_LIMIT_ROWS.getValue());
List<Long> toDelete = null;
int rowsDeleted = 0;
while ((toDelete = ids.fetch().into(Long.class)).size() > 0) {
rowsDeleted += create().delete(SERVICE_EVENT)
.where(SERVICE_EVENT.ID.in(toDelete)).execute();
}
if (rowsDeleted > 0) {
log.info("[Rows Deleted] service_event={}", rowsDeleted);
}
}
代码示例来源:origin: rancher/cattle
.from(INSTANCE_LABEL_MAP)
.join(INSTANCE).on(INSTANCE_LABEL_MAP.INSTANCE_ID.eq(INSTANCE.ID))
.where(INSTANCE.REMOVED.lt(cutoff))
.limit(QUERY_LIMIT_ROWS.getValue());
List<Long> toDelete = null;
.from(HOST_LABEL_MAP)
.join(HOST).on(HOST_LABEL_MAP.HOST_ID.eq(HOST.ID))
.where(HOST.REMOVED.lt(cutoff))
.limit(QUERY_LIMIT_ROWS.getValue());
.where(INSTANCE_LABEL_MAP.ID.isNull())
.and(HOST_LABEL_MAP.ID.isNull())
.and(LABEL.CREATED.lt(cutoff))
.limit(QUERY_LIMIT_ROWS.getValue());
代码示例来源:origin: rancher/cattle
return field.like(condition.getValue().toString());
case LT:
return field.lt(condition.getValue());
case LTE:
return field.le(condition.getValue());
代码示例来源:origin: org.jooq/jooq-meta
.when(f.RDB$FIELD_SUB_TYPE.eq((short) 1), "NUMERIC")
.when(f.RDB$FIELD_SUB_TYPE.eq((short) 0)
.and(f.RDB$FIELD_SCALE.lt((short) 0)), "NUMERIC")
.when(f.RDB$FIELD_SUB_TYPE.eq((short) 2), "DECIMAL")
.otherwise("SMALLINT"))
.when(f.RDB$FIELD_SUB_TYPE.eq((short) 1), "NUMERIC")
.when(f.RDB$FIELD_SUB_TYPE.eq((short) 0)
.and(f.RDB$FIELD_SCALE.lt((short) 0)), "NUMERIC")
.when(f.RDB$FIELD_SUB_TYPE.eq((short) 2), "DECIMAL")
.otherwise("INTEGER"))
.when(f.RDB$FIELD_SUB_TYPE.eq((short) 1), "NUMERIC")
.when(f.RDB$FIELD_SUB_TYPE.eq((short) 0)
.and(f.RDB$FIELD_SCALE.lt((short) 0)), "NUMERIC")
.when(f.RDB$FIELD_SUB_TYPE.eq((short) 2), "DECIMAL")
.otherwise("BIGINT"))
内容来源于网络,如有侵权,请联系作者删除!