com.datastax.driver.core.querybuilder.QueryBuilder.desc()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(6.8k)|赞(0)|评价(0)|浏览(78)

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

QueryBuilder.desc介绍

[英]Descending ordering for the provided column.
[中]所提供列的降序顺序。

代码示例

代码示例来源:origin: hugegraph/hugegraph

} else {
  assert order.getValue() == Order.DESC;
  select.orderBy(QueryBuilder.desc(name));

代码示例来源:origin: info.archinnov/integration-test-3_0

/**
 * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY c1 DESC</strong> */
public final MultiClusteringEntity_Select.W_C1 orderByC1Descending() {
 where.orderBy(QueryBuilder.desc("c1"));
 return this;
}

代码示例来源:origin: info.archinnov/integration-test-2_1

/**
 * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY clust DESC</strong> */
public final EntityWithUDTForDynamicKeyspace_Select.W_TM_Clust orderByClustDescending() {
 where.orderBy(QueryBuilder.desc("clust"));
 return this;
}

代码示例来源:origin: info.archinnov/integration-test-2

/**
 * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY clust DESC</strong> */
public final EntityWithNoKeyspaceUDT_Select.W_Clust orderByClustDescending() {
 where.orderBy(QueryBuilder.desc("clust"));
 return this;
}

代码示例来源:origin: info.archinnov/integration-test-2

/**
 * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY clust DESC</strong> */
public final EntityWithNoKeyspaceUDT_Select.W_TM_Clust orderByClustDescending() {
 where.orderBy(QueryBuilder.desc("clust"));
 return this;
}

代码示例来源:origin: info.archinnov/integration-test-2

/**
  * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY clust DESC</strong> */
 public final EntityWithNoKeyspaceUDT_Select.E_J orderByClustDescending() {
  where.orderBy(QueryBuilder.desc("clust"));
  return this;
 }
}

代码示例来源:origin: info.archinnov/integration-test-3_7

/**
 * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY clust DESC</strong> */
public final EntityWithSASIIndices_SelectIndex.E_TM orderByClustDescending() {
 where.orderBy(QueryBuilder.desc("clust"));
 return this;
}

代码示例来源:origin: info.archinnov/integration-test-3_7

/**
 * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY clust DESC</strong> */
public final EntityWithSASIIndices_SelectIndex.E_J orderByClustDescending() {
 where.orderBy(QueryBuilder.desc("clust"));
 return this;
}

代码示例来源:origin: info.archinnov/integration-test-3_0

/**
  * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY c1 DESC</strong> */
 public final MultiClusteringEntity_Select.E orderByC1Descending() {
  where.orderBy(QueryBuilder.desc("c1"));
  return this;
 }
}

代码示例来源:origin: info.archinnov/integration-test-3_0

/**
 * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY c1 DESC</strong> */
public final MultiClusteringEntity_Select.W_TM_C2 orderByC1Descending() {
 where.orderBy(QueryBuilder.desc("c1"));
 return this;
}

代码示例来源:origin: info.archinnov/integration-test-3_0

/**
 * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY c1 DESC</strong> */
public final MultiClusteringEntity_Select.W_J_C1 orderByC1Descending() {
 where.orderBy(QueryBuilder.desc("c1"));
 return this;
}

代码示例来源:origin: info.archinnov/integration-test-3_0

/**
  * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY c1 DESC</strong> */
 public final MultiClusteringEntity_Select.E_J orderByC1Descending() {
  where.orderBy(QueryBuilder.desc("c1"));
  return this;
 }
}

代码示例来源:origin: info.archinnov/integration-test-3_7

/**
  * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY clust DESC</strong> */
 public final EntityWithSASIIndices_Select.E_TM orderByClustDescending() {
  where.orderBy(QueryBuilder.desc("clust"));
  return this;
 }
}

代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core

.from("foo")
.where(eq("a", bindMarker()))
.orderBy(desc("b"))
.perPartitionLimit(2)
.limit(3)
.where(eq("a", bindMarker()))
.and(gt("b", bindMarker()))
.orderBy(desc("b"))
.perPartitionLimit(bindMarker())
.limit(3)

代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core

.where(in("a", InetAddress.getByName("127.0.0.1"), InetAddress.getByName("127.0.0.3")))
    .and(eq(quote("C"), "foo"))
    .orderBy(asc("a"), desc("b"))
    .limit(42);
assertEquals(select.toString(), query);
 select().countAll().from("foo").orderBy(asc("a"), desc("b")).orderBy(asc("a"), desc("b"));
 fail("Expected an IllegalStateException");
} catch (IllegalStateException e) {

代码示例来源:origin: scalar-labs/scalardb

private Ordering getOrdering(Scan.Ordering ordering) {
 switch (ordering.getOrder()) {
  case ASC:
   return QueryBuilder.asc(ordering.getName());
  case DESC:
   return QueryBuilder.desc(ordering.getName());
  default:
   LOGGER.warn("Unsupported ordering specified. Using Order.ASC.");
   return QueryBuilder.asc(ordering.getName());
 }
}

代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core

.where(eq("a", 1))
        .groupBy("a", "b", "c")
        .orderBy(desc("b"), desc("c"))))
.containsExactly(row(1, 4, 24, 2L, 24), row(1, 2, 12, 1L, 12), row(1, 2, 6, 1L, 6));
        .where(eq("a", 1))
        .groupBy("a", "b", "c")
        .orderBy(desc("b"), desc("c"))
        .perPartitionLimit(1)))
.containsExactly(row(1, 4, 24, 2L, 24));
        .where(eq("a", 1))
        .groupBy("a", "b", "c")
        .orderBy(desc("b"), desc("c"))
        .limit(2)))
.containsExactly(row(1, 4, 24, 2L, 24), row(1, 2, 12, 1L, 12));
        .where(in("a", 1, 2, 4))
        .groupBy("a", "b")
        .orderBy(desc("b"), desc("c"))
        .setFetchSize(Integer.MAX_VALUE)))
.containsExactly(
        .where(in("a", 1, 2, 4))
        .groupBy("a", "b")
        .orderBy(desc("b"), desc("c"))
        .limit(3)
        .setFetchSize(Integer.MAX_VALUE)))

代码示例来源:origin: tech.aroma/aroma-data-operations

private Statement createQueryToFindMessagesByApplication(String applicationId)
{
  UUID appId = UUID.fromString(applicationId);
  return QueryBuilder
      .select()
      .all()
      .from(Messages.TABLE_NAME)
      .where(eq(APP_ID, appId))
      .orderBy(desc(MESSAGE_ID))
      .limit(3000);
}

代码示例来源:origin: tech.aroma.banana/banana-data-operations

private Statement createQueryToFindMessagesByApplication(String applicationId)
{
  UUID appId = UUID.fromString(applicationId);
  
  return queryBuilder
    .select()
    .all()
    .from(Messages.TABLE_NAME)
    .where(eq(APP_ID, appId))
    .orderBy(desc(MESSAGE_ID))
    .limit(3000);
}

代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core

.from("test_ppl")
.where(eq("a", bindMarker()))
.orderBy(desc("b"))
.perPartitionLimit(bindMarker())
.getQueryString(),
.where(eq("a", bindMarker()))
.and(gt("b", bindMarker()))
.orderBy(desc("b"))
.perPartitionLimit(bindMarker())
.allowFiltering()

相关文章

微信公众号

最新文章

更多