String name = formatKey(order.getKey()); if (order.getValue() == Order.ASC) { select.orderBy(QueryBuilder.asc(name)); } else { assert order.getValue() == Order.DESC;
/** * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY clust ASC</strong> */ public final EntityWithSASIIndices_SelectIndex.E_TM orderByClustAscending() { where.orderBy(QueryBuilder.asc("clust")); return this; }
/** * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY c1 ASC</strong> */ public final MultiClusteringEntity_Select.W_TM_C1 orderByC1Ascending() { where.orderBy(QueryBuilder.asc("c1")); return this; }
/** * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY c1 ASC</strong> */ public final MultiClusteringEntity_Select.E_TM orderByC1Ascending() { where.orderBy(QueryBuilder.asc("c1")); return this; }
/** * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY clust ASC</strong> */ public final EntityWithSASIIndices_Select.W_TM_Clust orderByClustAscending() { where.orderBy(QueryBuilder.asc("clust")); return this; }
/** * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY clust ASC</strong> */ public final EntityWithSASIIndices_Select.E_TM orderByClustAscending() { where.orderBy(QueryBuilder.asc("clust")); return this; }
/** * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY clust ASC</strong> */ public final EntityWithSASIIndices_Select.W_J_Clust orderByClustAscending() { where.orderBy(QueryBuilder.asc("clust")); return this; }
/** * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY clust ASC</strong> */ public final EntityWithSASIIndices_Select.E_J orderByClustAscending() { where.orderBy(QueryBuilder.asc("clust")); return this; }
/** * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY clusteringColumn ASC</strong> */ public final EntityWithCaseSensitivePK_Select.W_Clust orderByClustAscending() { where.orderBy(QueryBuilder.asc("clusteringColumn")); return this; }
/** * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY clusteringColumn ASC</strong> */ public final EntityWithCaseSensitivePK_Select.E_TM orderByClustAscending() { where.orderBy(QueryBuilder.asc("clusteringColumn")); return this; }
/** * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY clust ASC</strong> */ public final EntityWithSASIIndices_SelectIndex.E orderByClustAscending() { where.orderBy(QueryBuilder.asc("clust")); return this; }
/** * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY clust ASC</strong> */ public final EntityWithSASIIndices_SelectIndex.E_J orderByClustAscending() { where.orderBy(QueryBuilder.asc("clust")); return this; }
/** * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY c1 ASC</strong> */ public final MultiClusteringEntity_Select.W_C2 orderByC1Ascending() { where.orderBy(QueryBuilder.asc("c1")); return this; }
/** * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY clust ASC</strong> */ public final EntityForJSONCall_Select.W_TM_Clust orderByClustAscending() { where.orderBy(QueryBuilder.asc("clust")); return this; }
/** * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY clusteringColumn ASC</strong> */ public final EntityWithCaseSensitivePK_Select.E orderByClustAscending() { where.orderBy(QueryBuilder.asc("clusteringColumn")); return this; }
/** * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY clusteringColumn ASC</strong> */ public final EntityWithCaseSensitivePK_Select.W_TM_Clust orderByClustAscending() { where.orderBy(QueryBuilder.asc("clusteringColumn")); return this; }
/** * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY clust ASC</strong> */ public final EntityForJSONCall_Select.E_TM orderByClustAscending() { where.orderBy(QueryBuilder.asc("clust")); return this; }
.from("foo") .groupBy("c1", column("c2"), raw("c3")) .orderBy(asc("c1")) .toString()) .isEqualTo("SELECT * FROM foo GROUP BY c1,c2,c3 ORDER BY c1 ASC;"); .where(eq("x", 42)) .groupBy("c1", column("c2"), raw("c3")) .orderBy(asc("c1")) .toString()) .isEqualTo("SELECT * FROM foo WHERE x=42 GROUP BY c1,c2,c3 ORDER BY c1 ASC;");
.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) {
@Override protected ResultSet queryRowGroupRowsAfter(Row row) { Statement statement = selectDeltaFrom(_placement.getBlockedDeltaTableDDL()) .where(eq(_placement.getBlockedDeltaTableDDL().getRowKeyColumnName(), getKey(row))) .and(gt(ImmutableList.of(_placement.getBlockedDeltaTableDDL().getChangeIdColumnName(), _placement.getBlockedDeltaTableDDL().getBlockColumnName()), ImmutableList.of(getChangeId(row), getBlock(row)))) .orderBy(asc(_placement.getBlockedDeltaTableDDL().getChangeIdColumnName())) .setConsistencyLevel(_consistency); return AdaptiveResultSet.executeAdaptiveQuery(_placement.getKeyspace().getCqlSession(), statement, _driverConfig.getSingleRowFetchSize()); } }