.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);
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); }
@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()); } }
/** * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY clust ASC</strong> */ public final EntityForJSONCall_Select.E_J orderByClustAscending() { where.orderBy(QueryBuilder.asc("clust")); return this; }
/** * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY clust ASC</strong> */ public final EntityForJSONCall_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 EntityForJSONCall_Select.E orderByClustAscending() { where.orderBy(QueryBuilder.asc("clust")); return this; }
/** * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY clust ASC</strong> */ public final EntityForJSONCall_Select.W_Clust orderByClustAscending() { where.orderBy(QueryBuilder.asc("clust")); return this; }
/** * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY clust ASC</strong> */ public final EntityWithSASIIndices_Select.W_Clust orderByClustAscending() { where.orderBy(QueryBuilder.asc("clust")); return this; }
/** * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY clust ASC</strong> */ public final EntityWithUDTForDynamicKeyspace_Select.E_TM orderByClustAscending() { where.orderBy(QueryBuilder.asc("clust")); return this; }
/** * 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; }
/** * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY clust ASC</strong> */ public final EntityWithUDTForDynamicKeyspace_Select.E orderByClustAscending() { where.orderBy(QueryBuilder.asc("clust")); return this; }
/** * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY clust ASC</strong> */ public final EntityWithUDTForDynamicKeyspace_Select.W_Clust orderByClustAscending() { where.orderBy(QueryBuilder.asc("clust")); return this; }
/** * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY c1 ASC</strong> */ public final MultiClusteringEntity_Select.W_J_C2 orderByC1Ascending() { where.orderBy(QueryBuilder.asc("c1")); return this; }
/** * 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; }
/** * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY c1 ASC</strong> */ public final MultiClusteringEntity_Select.W_C1 orderByC1Ascending() { where.orderBy(QueryBuilder.asc("c1")); return this; }
/** * Generate a SELECT ... FROM ... WHERE ... <strong>ORDER BY clust ASC</strong> */ public final EntityWithNoKeyspaceUDT_Select.E orderByClustAscending() { where.orderBy(QueryBuilder.asc("clust")); return this; }
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); }
private PreparedStatement prepareReadStatement(Session session) { return session.prepare(select(UID) .from(TABLE_NAME) .where(eq(MAILBOX_ID, bindMarker(MAILBOX_ID))) .orderBy(asc(UID)) .limit(1)); }