本文整理了Java中org.jooq.TableField.asc()
方法的一些代码示例,展示了TableField.asc()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableField.asc()
方法的具体详情如下:
包路径:org.jooq.TableField
类名称:TableField
方法名:asc
暂无
代码示例来源:origin: k55k32/cms-admin-end
@Override
public PageResult<Catalog> page(PageResult<Catalog> page) {
dao.fetch(page, Tables.C_CATALOG.SORT.asc());
return page;
}
代码示例来源:origin: k55k32/cms-admin-end
public List<PageView> findByTime(Long start, Long end) {
return dao.fetch(getCondition(start, end), C_PAGE_VIEW.CREATE_TIME.asc());
}
代码示例来源:origin: rancher/cattle
private DynamicSchema getSchemaInternal(String name, long accountId, String role) {
List<Record> records = schemaQuery(accountId, role)
.and(DYNAMIC_SCHEMA.NAME.eq(name))
.orderBy(DYNAMIC_SCHEMA.CREATED.asc())
.fetch();
if (records.size() == 0 && name != null && name.endsWith("s")) {
return getSchemaInternal(TypeUtils.guessSingularName(name), accountId, role);
}
if (records.size() == 1) {
return records.get(0).into(DynamicSchema.class);
} else if (records.size() == 0) {
return NULL;
} else {
return pickRecordOnPriority(records, accountId, role);
}
}
代码示例来源:origin: making/demo-spring-boot-1.3
public List<Customer> findAll() {
return dslContext.select()
.from(CUSTOMERS)
.orderBy(CUSTOMERS.FIRST_NAME.asc())
.fetchInto(Customer.class);
}
}
代码示例来源:origin: org.jooq/jooq-meta
@Override
protected List<TableDefinition> getTables0() throws SQLException {
List<TableDefinition> result = new ArrayList<TableDefinition>();
for (Record record : create()
.select(
DB_CLASS.CLASS_NAME)
.from(DB_CLASS)
.orderBy(
DB_CLASS.CLASS_NAME.asc())
.fetch()) {
String name = record.get(DB_CLASS.CLASS_NAME);
CUBRIDTableDefinition table = new CUBRIDTableDefinition(getSchemata().get(0), name, null);
result.add(table);
}
return result;
}
代码示例来源:origin: com.gitee.hengboy/micro-job-common
/**
* 根据指定状态查询全部的任务
*
* @param executeStatus 执行状态
* @return
*/
public List<JobNodeExecuteDetailRecord> selectAll(String executeStatus) {
return dslContext.selectFrom(JOB_NODE_EXECUTE_DETAIL)
.where(JobNodeExecuteDetail.NED_STATUS.eq(executeStatus))
.orderBy(JobNodeExecuteDetail.NED_ID.asc())
.fetch().into(JobNodeExecuteDetailRecord.class);
}
代码示例来源: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: org.jooq/jooq-meta
private Result<Record3<String, String, String>> fetchKeys(String constraintType) {
return create()
.select(
RDB$RELATION_CONSTRAINTS.RDB$CONSTRAINT_NAME.trim(),
RDB$RELATION_CONSTRAINTS.RDB$RELATION_NAME.trim(),
RDB$INDEX_SEGMENTS.RDB$FIELD_NAME.trim())
.from(RDB$RELATION_CONSTRAINTS)
.join(RDB$INDEX_SEGMENTS)
.on(RDB$INDEX_SEGMENTS.RDB$INDEX_NAME.eq(RDB$RELATION_CONSTRAINTS.RDB$INDEX_NAME))
.where(RDB$RELATION_CONSTRAINTS.RDB$CONSTRAINT_TYPE.eq(constraintType))
.orderBy(
RDB$RELATION_CONSTRAINTS.RDB$CONSTRAINT_NAME.asc(),
RDB$INDEX_SEGMENTS.RDB$FIELD_POSITION.asc())
.fetch();
}
代码示例来源:origin: com.gitee.hengboy/micro-job-common
/**
* 查询任务执行记录
*
* @param executeStatus 任务状态 详见JobExecuteStatusEnum
* @param limit 查询条件
* @return
*/
public List<JobNodeExecuteDetailRecord> select(String executeStatus, int limit) {
return dslContext.selectFrom(JOB_NODE_EXECUTE_DETAIL)
.where(JobNodeExecuteDetail.NED_STATUS.eq(executeStatus))
.orderBy(JobNodeExecuteDetail.NED_ID.asc())
.limit(limit)
.fetch().into(JobNodeExecuteDetailRecord.class);
}
代码示例来源:origin: rancher/cattle
@Override
public List<? extends ProjectMember> getActiveProjectMembers(long id) {
return create()
.selectFrom(PROJECT_MEMBER)
.where(PROJECT_MEMBER.PROJECT_ID.eq(id))
.and(PROJECT_MEMBER.STATE.eq(CommonStatesConstants.ACTIVE))
.and(PROJECT_MEMBER.REMOVED.isNull())
.orderBy(PROJECT_MEMBER.ID.asc()).fetch();
}
代码示例来源:origin: rancher/cattle
@Override
public Account getAccountByExternalId(String externalId, String externalType) {
return create()
.selectFrom(ACCOUNT)
.where(
ACCOUNT.EXTERNAL_ID.eq(externalId)
.and(ACCOUNT.EXTERNAL_ID_TYPE.eq(externalType))
.and(ACCOUNT.STATE.ne("purged"))
).orderBy(ACCOUNT.ID.asc()).fetchOne();
}
代码示例来源:origin: rancher/cattle
@Override
public Account getAccountByUuid(String uuid) {
return create()
.selectFrom(ACCOUNT)
.where(ACCOUNT.UUID.eq(uuid)
.and(ACCOUNT.STATE.in(getActiveStates())))
.orderBy(ACCOUNT.ID.asc()).limit(1).fetchOne();
}
代码示例来源:origin: rancher/cattle
@Override
public Account getAdminAccount() {
return create()
.selectFrom(ACCOUNT)
.where(ACCOUNT.STATE.in(getActiveStates())
.and(ACCOUNT.KIND.eq(AccountConstants.ADMIN_KIND)))
.orderBy(ACCOUNT.ID.asc()).limit(1).fetchOne();
}
代码示例来源:origin: rancher/cattle
@Override
public Account getAdminAccountExclude(long accountId) {
return create()
.selectFrom(ACCOUNT)
.where(ACCOUNT.STATE.in(getAccountActiveStates())
.and(ACCOUNT.KIND.eq(AccountConstants.ADMIN_KIND))
.and(ACCOUNT.ID.ne(accountId)))
.orderBy(ACCOUNT.ID.asc()).limit(1).fetchOne();
}
代码示例来源:origin: rancher/cattle
@Override
public List<String> findInstanceNamesForService(long serviceId) {
return create()
.select(INSTANCE.NAME)
.from(INSTANCE)
.join(SERVICE_EXPOSE_MAP)
.on(SERVICE_EXPOSE_MAP.INSTANCE_ID.eq(INSTANCE.ID))
.where(INSTANCE.REMOVED.isNull()
.and(SERVICE_EXPOSE_MAP.REMOVED.isNull())
.and(SERVICE_EXPOSE_MAP.SERVICE_ID.eq(serviceId)))
.orderBy(INSTANCE.NAME.asc())
.fetch(INSTANCE.NAME);
}
代码示例来源:origin: rancher/cattle
@Override
public List<Long> getAgentProviderIgnoreHealth(String providedServiceLabel, long accountId) {
return Arrays.asList(create().select(INSTANCE.AGENT_ID)
.from(INSTANCE)
.join(INSTANCE_LABEL_MAP)
.on(INSTANCE_LABEL_MAP.INSTANCE_ID.eq(INSTANCE.ID))
.join(LABEL)
.on(LABEL.ID.eq(INSTANCE_LABEL_MAP.LABEL_ID).and(LABEL.KEY.eq(providedServiceLabel)))
.where(INSTANCE.ACCOUNT_ID.eq(accountId)
.and(INSTANCE.AGENT_ID.isNotNull())
.and(INSTANCE.SYSTEM.isTrue())
.and(INSTANCE.STATE.in(InstanceConstants.STATE_RUNNING, InstanceConstants.STATE_STARTING)))
.orderBy(INSTANCE.AGENT_ID.asc())
.fetch().intoArray(INSTANCE.AGENT_ID));
}
代码示例来源:origin: rancher/cattle
@Override
public List<Account> searchUsers(String username) {
return create()
.select(ACCOUNT.fields())
.from(ACCOUNT)
.join(CREDENTIAL)
.on(CREDENTIAL.ACCOUNT_ID.eq(ACCOUNT.ID))
.where(ACCOUNT.STATE.in(getActiveStates())
.and(CREDENTIAL.STATE.eq(CommonStatesConstants.ACTIVE))
.and(CREDENTIAL.PUBLIC_VALUE.contains(username))
.and(CREDENTIAL.KIND.eq(CredentialConstants.KIND_PASSWORD)))
.orderBy(ACCOUNT.ID.asc()).fetchInto(Account.class);
}
代码示例来源:origin: org.jooq/jooq-meta
private Result<Record3<String, String, String>> fetchKeys(Condition condition) {
return
create().select(
concat(DB_CLASS.CLASS_NAME, val("__"), DB_INDEX.INDEX_NAME).as("constraint_name"),
DB_INDEX_KEY.KEY_ATTR_NAME,
DB_CLASS.CLASS_NAME)
.from(DB_INDEX)
.join(DB_CLASS).on(DB_INDEX.CLASS_NAME.equal(DB_CLASS.CLASS_NAME))
.join(DB_INDEX_KEY).on(
DB_INDEX_KEY.INDEX_NAME.equal(DB_INDEX.INDEX_NAME).and(
DB_INDEX_KEY.CLASS_NAME.equal(DB_INDEX.CLASS_NAME)))
.where(condition)
.orderBy(
DB_INDEX.INDEX_NAME.asc())
.fetch();
}
代码示例来源:origin: rancher/cattle
protected List<? extends ConfigItemStatus> agentOutOfSyncItems() {
return create()
.select(CONFIG_ITEM_STATUS.fields())
.from(CONFIG_ITEM_STATUS)
.join(AGENT)
.on(AGENT.ID.eq(CONFIG_ITEM_STATUS.AGENT_ID))
.leftOuterJoin(INSTANCE)
.on(INSTANCE.AGENT_ID.eq(AGENT.ID))
.where(CONFIG_ITEM_STATUS.REQUESTED_VERSION.ne(CONFIG_ITEM_STATUS.APPLIED_VERSION)
.and(AGENT.STATE.in(CommonStatesConstants.ACTIVE, CommonStatesConstants.ACTIVATING,
AgentConstants.STATE_RECONNECTING, AgentConstants.STATE_FINISHING_RECONNECT,
AgentConstants.STATE_RECONNECTED))
.and(INSTANCE.STATE.isNull().or(INSTANCE.STATE.eq(InstanceConstants.STATE_RUNNING))))
.orderBy(AGENT.ID.asc())
.limit(BATCH_SIZE.get())
.fetchInto(ConfigItemStatusRecord.class);
}
代码示例来源:origin: rancher/cattle
protected List<? extends ConfigItemStatus> agentMigrationItems() {
return create()
.select(CONFIG_ITEM_STATUS.fields())
.from(CONFIG_ITEM_STATUS)
.join(AGENT)
.on(AGENT.ID.eq(CONFIG_ITEM_STATUS.AGENT_ID))
.join(CONFIG_ITEM)
.on(CONFIG_ITEM.NAME.eq(CONFIG_ITEM_STATUS.NAME))
.leftOuterJoin(INSTANCE)
.on(INSTANCE.AGENT_ID.eq(AGENT.ID))
.where(CONFIG_ITEM_STATUS.SOURCE_VERSION.isNotNull()
.and(CONFIG_ITEM_STATUS.SOURCE_VERSION.ne(CONFIG_ITEM.SOURCE_VERSION))
.and(AGENT.STATE.in(CommonStatesConstants.ACTIVE, CommonStatesConstants.ACTIVATING,
AgentConstants.STATE_RECONNECTING, AgentConstants.STATE_FINISHING_RECONNECT,
AgentConstants.STATE_RECONNECTED))
.and(INSTANCE.STATE.isNull().or(INSTANCE.STATE.eq(InstanceConstants.STATE_RUNNING))))
.orderBy(AGENT.ID.asc())
.limit(BATCH_SIZE.get())
.fetchInto(ConfigItemStatusRecord.class);
}
内容来源于网络,如有侵权,请联系作者删除!