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

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

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

TableField.ne介绍

暂无

代码示例

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

@Override
public List<String> getServiceNames() {
 try (Connection conn = datasource.getConnection()) {
  return context.get(conn)
    .selectDistinct(ZIPKIN_ANNOTATIONS.ENDPOINT_SERVICE_NAME)
    .from(ZIPKIN_ANNOTATIONS)
    .where(ZIPKIN_ANNOTATIONS.ENDPOINT_SERVICE_NAME.isNotNull()
      .and(ZIPKIN_ANNOTATIONS.ENDPOINT_SERVICE_NAME.ne("")))
    .fetch(ZIPKIN_ANNOTATIONS.ENDPOINT_SERVICE_NAME);
 } catch (SQLException e) {
  throw new RuntimeException("Error querying for " + e + ": " + e.getMessage());
 }
}

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

@Override
public List<String> getServiceNames() {
 try (Connection conn = datasource.getConnection()) {
  return context.get(conn)
    .selectDistinct(ZIPKIN_ANNOTATIONS.ENDPOINT_SERVICE_NAME)
    .from(ZIPKIN_ANNOTATIONS)
    .where(ZIPKIN_ANNOTATIONS.ENDPOINT_SERVICE_NAME.isNotNull()
      .and(ZIPKIN_ANNOTATIONS.ENDPOINT_SERVICE_NAME.ne("")))
    .fetch(ZIPKIN_ANNOTATIONS.ENDPOINT_SERVICE_NAME);
 } catch (SQLException e) {
  throw new RuntimeException("Error querying for " + e + ": " + e.getMessage());
 }
}

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

@Override
public List<String> getServiceNames() {
 try (Connection conn = datasource.getConnection()) {
  return context(conn)
    .selectDistinct(ZIPKIN_ANNOTATIONS.ENDPOINT_SERVICE_NAME)
    .from(ZIPKIN_ANNOTATIONS)
    .where(ZIPKIN_ANNOTATIONS.ENDPOINT_SERVICE_NAME.isNotNull()
      .and(ZIPKIN_ANNOTATIONS.ENDPOINT_SERVICE_NAME.ne("")))
    .fetch(ZIPKIN_ANNOTATIONS.ENDPOINT_SERVICE_NAME);
 } catch (SQLException e) {
  throw new RuntimeException("Error querying for " + e + ": " + e.getMessage());
 }
}

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

@Override
public List<String> getServiceNames() {
 try (Connection conn = datasource.getConnection()) {
  return context.get(conn)
    .selectDistinct(ZIPKIN_ANNOTATIONS.ENDPOINT_SERVICE_NAME)
    .from(ZIPKIN_ANNOTATIONS)
    .where(ZIPKIN_ANNOTATIONS.ENDPOINT_SERVICE_NAME.isNotNull()
      .and(ZIPKIN_ANNOTATIONS.ENDPOINT_SERVICE_NAME.ne("")))
    .fetch(ZIPKIN_ANNOTATIONS.ENDPOINT_SERVICE_NAME);
 } catch (SQLException e) {
  throw new RuntimeException("Error querying for " + e + ": " + e.getMessage());
 }
}

代码示例来源:origin: rancher/cattle

@Override
  public void reset(String itemName, String version) {
    create().update(CONFIG_ITEM_STATUS)
      .set(CONFIG_ITEM_STATUS.APPLIED_VERSION, -1L)
      .set(CONFIG_ITEM_STATUS.REQUESTED_VERSION, 0L)
      .set(CONFIG_ITEM_STATUS.REQUESTED_UPDATED, new Date())
      .where(CONFIG_ITEM_STATUS.NAME.eq(itemName)
          .and(CONFIG_ITEM_STATUS.SOURCE_VERSION.ne(version)))
      .execute();
  }
}

代码示例来源:origin: rancher/cattle

@Override
public Account getAccountById(Long id) {
  return create()
      .selectFrom(ACCOUNT)
      .where(
          ACCOUNT.ID.eq(id)
              .and(ACCOUNT.STATE.ne(CommonStatesConstants.PURGED))
              .and(ACCOUNT.REMOVED.isNull())
      ).fetchOne();
}

代码示例来源:origin: rancher/cattle

private SelectConditionStep<Record> schemaQuery(long accountId, String role) {
  return create()
      .select()
      .from(DYNAMIC_SCHEMA).leftOuterJoin(DYNAMIC_SCHEMA_ROLE)
      .on(DYNAMIC_SCHEMA_ROLE.DYNAMIC_SCHEMA_ID.eq(DYNAMIC_SCHEMA.ID))
      .where(DYNAMIC_SCHEMA.ACCOUNT_ID.eq(accountId)
          .and(DYNAMIC_SCHEMA_ROLE.ROLE.eq(role))
          .and(DYNAMIC_SCHEMA.STATE.ne(CommonStatesConstants.PURGED)))
      .or(DYNAMIC_SCHEMA.ACCOUNT_ID.eq(accountId)
          .and(DYNAMIC_SCHEMA_ROLE.ROLE.isNull())
          .and(DYNAMIC_SCHEMA.STATE.ne(CommonStatesConstants.PURGED)))
      .or(DYNAMIC_SCHEMA_ROLE.ROLE.eq(role)
          .and(DYNAMIC_SCHEMA.ACCOUNT_ID.isNull())
          .and(DYNAMIC_SCHEMA.STATE.ne(CommonStatesConstants.PURGED)));
}

代码示例来源:origin: rancher/cattle

@Override
public Account getAccountById(Long id) {
  return create()
      .selectFrom(ACCOUNT)
      .where(
          ACCOUNT.ID.eq(id)
              .and(ACCOUNT.STATE.ne(CommonStatesConstants.PURGED))
              .and(ACCOUNT.REMOVED.isNull())
      ).fetchOne();
}

代码示例来源: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 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

protected List<? extends ConfigItemStatus> stackOutOfSyncItems() {
  return create()
      .select(CONFIG_ITEM_STATUS.fields())
      .from(CONFIG_ITEM_STATUS)
      .join(STACK)
      .on(STACK.ID.eq(CONFIG_ITEM_STATUS.STACK_ID))
      .where(CONFIG_ITEM_STATUS.REQUESTED_VERSION.ne(CONFIG_ITEM_STATUS.APPLIED_VERSION)
          .and(STACK.REMOVED.isNull()))
      .limit(BATCH_SIZE.get())
      .fetchInto(ConfigItemStatusRecord.class);
}

代码示例来源:origin: rancher/cattle

protected List<? extends ConfigItemStatus> serviceOutOfSyncItems() {
  return create()
      .select(CONFIG_ITEM_STATUS.fields())
      .from(CONFIG_ITEM_STATUS)
      .join(SERVICE)
      .on(SERVICE.ID.eq(CONFIG_ITEM_STATUS.SERVICE_ID))
      .where(CONFIG_ITEM_STATUS.REQUESTED_VERSION.ne(CONFIG_ITEM_STATUS.APPLIED_VERSION)
          .and(SERVICE.REMOVED.isNull()))
      .limit(BATCH_SIZE.get())
      .fetchInto(ConfigItemStatusRecord.class);
}

代码示例来源:origin: rancher/cattle

protected List<? extends ConfigItemStatus> accountOutOfSyncItems() {
  return create()
      .select(CONFIG_ITEM_STATUS.fields())
      .from(CONFIG_ITEM_STATUS)
      .join(ACCOUNT)
      .on(ACCOUNT.ID.eq(CONFIG_ITEM_STATUS.ACCOUNT_ID))
      .where(CONFIG_ITEM_STATUS.REQUESTED_VERSION.ne(CONFIG_ITEM_STATUS.APPLIED_VERSION)
          .and(ACCOUNT.REMOVED.isNull()))
      .limit(BATCH_SIZE.get())
      .fetchInto(ConfigItemStatusRecord.class);
}

代码示例来源:origin: rancher/cattle

protected List<? extends ConfigItemStatus> hostOutOfSyncItems() {
  return create()
      .select(CONFIG_ITEM_STATUS.fields())
      .from(CONFIG_ITEM_STATUS)
      .join(HOST)
      .on(HOST.ID.eq(CONFIG_ITEM_STATUS.HOST_ID))
      .where(CONFIG_ITEM_STATUS.REQUESTED_VERSION.ne(CONFIG_ITEM_STATUS.APPLIED_VERSION)
          .and(HOST.REMOVED.isNull()))
      .limit(BATCH_SIZE.get())
      .fetchInto(ConfigItemStatusRecord.class);
}

代码示例来源:origin: rancher/cattle

@Override
public Service getComposeServiceByName(long accountId, String name, String projectName) {
  List<? extends Service> services = create().select(SERVICE.fields())
    .from(SERVICE)
    .join(STACK)
      .on(STACK.ID.eq(SERVICE.STACK_ID))
    .where(SERVICE.ACCOUNT_ID.eq(accountId)
        .and(SERVICE.NAME.eq(name))
        .and(SERVICE.REMOVED.isNull())
        .and(SERVICE.STATE.ne(CommonStatesConstants.REMOVING))
        .and(SERVICE.KIND.eq(DockerConstants.TYPE_COMPOSE_SERVICE))
        .and(STACK.NAME.eq(projectName))
        .and(STACK.KIND.eq(DockerConstants.TYPE_COMPOSE_PROJECT))
        .and(STACK.REMOVED.isNull())).fetchInto(ServiceRecord.class);
  return services.size() > 0 ? services.get(0) : null;
}

代码示例来源:origin: rancher/cattle

protected List<? extends ConfigItemStatus> stackMigrationItems() {
  return create()
      .select(CONFIG_ITEM_STATUS.fields())
      .from(CONFIG_ITEM_STATUS)
      .join(STACK)
      .on(STACK.ID.eq(CONFIG_ITEM_STATUS.STACK_ID))
      .join(CONFIG_ITEM)
      .on(CONFIG_ITEM.NAME.eq(CONFIG_ITEM_STATUS.NAME))
      .where(CONFIG_ITEM_STATUS.SOURCE_VERSION.isNotNull()
          .and(CONFIG_ITEM_STATUS.SOURCE_VERSION.ne(CONFIG_ITEM.SOURCE_VERSION))
          .and(STACK.REMOVED.isNull()))
      .limit(BATCH_SIZE.get())
      .fetchInto(ConfigItemStatusRecord.class);
}

代码示例来源:origin: rancher/cattle

protected List<? extends ConfigItemStatus> hostMigrationItems() {
  return create()
      .select(CONFIG_ITEM_STATUS.fields())
      .from(CONFIG_ITEM_STATUS)
      .join(HOST)
      .on(HOST.ID.eq(CONFIG_ITEM_STATUS.HOST_ID))
      .join(CONFIG_ITEM)
      .on(CONFIG_ITEM.NAME.eq(CONFIG_ITEM_STATUS.NAME))
      .where(CONFIG_ITEM_STATUS.SOURCE_VERSION.isNotNull()
          .and(CONFIG_ITEM_STATUS.SOURCE_VERSION.ne(CONFIG_ITEM.SOURCE_VERSION))
          .and(HOST.REMOVED.isNull()))
      .limit(BATCH_SIZE.get())
      .fetchInto(ConfigItemStatusRecord.class);
}

代码示例来源:origin: rancher/cattle

protected List<? extends ConfigItemStatus> serviceMigrationItems() {
  return create()
      .select(CONFIG_ITEM_STATUS.fields())
      .from(CONFIG_ITEM_STATUS)
      .join(SERVICE)
      .on(SERVICE.ID.eq(CONFIG_ITEM_STATUS.SERVICE_ID))
      .join(CONFIG_ITEM)
      .on(CONFIG_ITEM.NAME.eq(CONFIG_ITEM_STATUS.NAME))
      .where(CONFIG_ITEM_STATUS.SOURCE_VERSION.isNotNull()
          .and(CONFIG_ITEM_STATUS.SOURCE_VERSION.ne(CONFIG_ITEM.SOURCE_VERSION))
          .and(SERVICE.REMOVED.isNull()))
      .limit(BATCH_SIZE.get())
      .fetchInto(ConfigItemStatusRecord.class);
}

代码示例来源:origin: rancher/cattle

protected List<? extends ConfigItemStatus> accountMigrationItems() {
  return create()
      .select(CONFIG_ITEM_STATUS.fields())
      .from(CONFIG_ITEM_STATUS)
      .join(ACCOUNT)
      .on(ACCOUNT.ID.eq(CONFIG_ITEM_STATUS.ACCOUNT_ID))
      .join(CONFIG_ITEM)
      .on(CONFIG_ITEM.NAME.eq(CONFIG_ITEM_STATUS.NAME))
      .where(CONFIG_ITEM_STATUS.SOURCE_VERSION.isNotNull()
          .and(CONFIG_ITEM_STATUS.SOURCE_VERSION.ne(CONFIG_ITEM.SOURCE_VERSION))
          .and(ACCOUNT.REMOVED.isNull()))
      .limit(BATCH_SIZE.get())
      .fetchInto(ConfigItemStatusRecord.class);
}

代码示例来源:origin: rancher/cattle

@Override
public List<Long> getInstancesWithVolumeMounted(long volumeId, long currentInstanceId) {
  return create()
      .select(INSTANCE.ID)
      .from(INSTANCE)
      .join(MOUNT)
        .on(MOUNT.INSTANCE_ID.eq(INSTANCE.ID).and(MOUNT.VOLUME_ID.eq(volumeId)))
      .join(INSTANCE_HOST_MAP)
        .on(INSTANCE_HOST_MAP.INSTANCE_ID.eq(INSTANCE.ID))
      .where(INSTANCE.REMOVED.isNull()
        .and(INSTANCE.ID.ne(currentInstanceId))
        .and(INSTANCE_HOST_MAP.STATE.notIn(IHM_STATES))
        .and((INSTANCE.HEALTH_STATE.isNull().or(INSTANCE.HEALTH_STATE.eq(HealthcheckConstants.HEALTH_STATE_HEALTHY)))))
      .fetchInto(Long.class);
}

相关文章