本文整理了Java中org.jooq.TableField.greaterThan()
方法的一些代码示例,展示了TableField.greaterThan()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableField.greaterThan()
方法的具体详情如下:
包路径:org.jooq.TableField
类名称:TableField
方法名:greaterThan
暂无
代码示例来源:origin: bwajtr/java-persistence-frameworks-comparison
@Override
public List<Employee> employeesWithSalaryGreaterThan(Integer minSalary) {
logger.info("Looking for employeesWithSalaryGreaterThan using JOOQ");
return create
.select()
.from(EMPLOYEE)
.where(EMPLOYEE.SALARY.greaterThan(new BigDecimal(minSalary)))
.fetchInto(Employee.class);
}
代码示例来源:origin: rancher/cattle
@Override
public void deletePreviousTokens(long authenticatedAsAccountId, long tokenAccountId) {
create().delete(AUTH_TOKEN)
.where(AUTH_TOKEN.AUTHENTICATED_AS_ACCOUNT_ID.eq(authenticatedAsAccountId))
.and(AUTH_TOKEN.ACCOUNT_ID.eq(tokenAccountId))
.and(AUTH_TOKEN.EXPIRES.greaterThan(new Date()))
.execute();
}
}
代码示例来源:origin: rancher/cattle
@Override
public AuthTokenRecord getTokenByKey(String key) {
return create()
.selectFrom(AUTH_TOKEN)
.where(AUTH_TOKEN.KEY.eq(key))
.and(AUTH_TOKEN.VERSION.eq(SecurityConstants.TOKEN_VERSION))
.and(AUTH_TOKEN.EXPIRES.greaterThan(new Date()))
.orderBy(AUTH_TOKEN.ID.asc()).fetchOne();
}
代码示例来源:origin: rancher/cattle
final Map<String, ProcessSummary> processSummary = new TreeMap<>();
final Field<Boolean> running = DSL.field(PROCESS_INSTANCE.RUNNING_PROCESS_SERVER_ID.isNotNull()).as("running");
final Field<Boolean> delayed = DSL.field(PROCESS_INSTANCE.RUN_AFTER.greaterThan(new Date())).as("foo");
final Field<Integer> count = PROCESS_INSTANCE.PROCESS_NAME.count().as("count");
代码示例来源:origin: rancher/cattle
@Override
public AuthToken getTokenByAccountId(long accountId) {
return create()
.selectFrom(AUTH_TOKEN)
.where(AUTH_TOKEN.ACCOUNT_ID.eq(accountId))
.and(AUTH_TOKEN.VERSION.eq(SecurityConstants.TOKEN_VERSION))
.and(AUTH_TOKEN.PROVIDER.eq(SecurityConstants.AUTH_PROVIDER.get()))
.and(AUTH_TOKEN.EXPIRES.greaterThan(new Date()))
.orderBy(AUTH_TOKEN.EXPIRES.desc()).fetchAny();
}
代码示例来源:origin: com.walmartlabs.concord.server/concord-server
public List<String> pollStalled(DSLContext tx, Field<Timestamp> cutOff) {
return tx.select(TASKS.TASK_ID)
.from(TASKS)
.where(TASKS.LAST_UPDATED_AT.lessThan(cutOff)
.and(TASKS.FINISHED_AT.isNull())
.and(TASKS.TASK_INTERVAL.greaterThan(0L)))
.forUpdate()
.skipLocked()
.fetch(TASKS.TASK_ID);
}
代码示例来源:origin: com.walmartlabs.concord.server/concord-server
public UUID findUserId(String key) {
try (DSLContext tx = DSL.using(cfg)) {
return tx.select(API_KEYS.USER_ID)
.from(API_KEYS)
.where(API_KEYS.API_KEY.eq(hash(key))
.and(API_KEYS.EXPIRED_AT.isNull()
.or(API_KEYS.EXPIRED_AT.greaterThan(currentTimestamp()))))
.fetchOne(API_KEYS.USER_ID);
}
}
代码示例来源:origin: com.walmartlabs.concord.server/concord-server
public List<String> poll() {
@SuppressWarnings("unchecked")
Field<? extends Number> i = (Field<? extends Number>) PgUtils.interval("1 second");
return txResult(tx -> {
List<String> ids = tx.select(TASKS.TASK_ID)
.from(TASKS)
.where(TASKS.TASK_INTERVAL.greaterThan(0L).and(TASKS.STARTED_AT.isNull()
.or(TASKS.FINISHED_AT.isNotNull()
.and(TASKS.FINISHED_AT.plus(TASKS.TASK_INTERVAL.mul(i)).lessOrEqual(currentTimestamp())))))
.forUpdate()
.skipLocked()
.fetch(TASKS.TASK_ID);
if (ids.isEmpty()) {
return ids;
}
tx.update(TASKS)
.set(TASKS.STARTED_AT, currentTimestamp())
.set(TASKS.TASK_STATUS, value("RUNNING"))
.set(TASKS.FINISHED_AT, (Timestamp)null)
.set(TASKS.LAST_UPDATED_AT, currentTimestamp())
.where(TASKS.TASK_ID.in(ids))
.execute();
return ids;
});
}
代码示例来源:origin: com.walmartlabs.concord.server/concord-server
public List<EventItem> list(DSLContext tx, EventMarker marker, int count) {
ProcessEvents pe = PROCESS_EVENTS.as("pe");
SelectConditionStep<Record9<UUID, Timestamp, Long, Timestamp, String, String, String, Long, Boolean>> q = tx.select(
pe.INSTANCE_ID,
pe.INSTANCE_CREATED_AT,
pe.EVENT_SEQ,
pe.EVENT_DATE,
field("{0}->>'host'", String.class, pe.EVENT_DATA),
coalesce(field("{0}->>'hostGroup'", String.class, pe.EVENT_DATA), value("-")),
field("{0}->>'status'", String.class, pe.EVENT_DATA),
coalesce(field("{0}->>'duration'", Long.class, pe.EVENT_DATA), value("0")),
coalesce(field("{0}->>'ignore_errors'", Boolean.class, pe.EVENT_DATA), value("false")))
.from(pe)
.where(pe.EVENT_TYPE.eq(EventType.ANSIBLE.name()));
if (marker != null) {
q.and(pe.EVENT_DATE.greaterOrEqual(marker.eventDate()))
.and(pe.INSTANCE_CREATED_AT.greaterOrEqual(marker.startFrom())
.and(pe.EVENT_SEQ.greaterThan(marker.eventSeq())));
if (marker.endTo() != null) {
q.and(pe.INSTANCE_CREATED_AT.lessThan(marker.endTo()));
}
}
return q.orderBy(pe.EVENT_SEQ)
.limit(count)
.fetch(AnsibleEventDao::toEntity);
}
代码示例来源:origin: com.walmartlabs.concord.server/concord-server
query.addConditions(PROCESS_QUEUE.CREATED_AT.greaterThan(filter.afterCreatedAt()));
内容来源于网络,如有侵权,请联系作者删除!