@Test public void columnSelection() { byte[] colTwo = new byte[] { 7, 8, 9 }; FullQuery.Builder builder = FullQuery.builder(); RangePredicateHelper.create(false, DBType.ORACLE, builder).columnSelection(ImmutableList.of(COL_NAME, colTwo)); FullQuery query = builder.build(); assertThat(query.getQuery(), equalTo(" AND (col_name = ? OR col_name = ?) ")); assertThat(query.getArgs(), arrayContaining(COL_NAME, colTwo)); }
public RangePredicateHelper columnSelection(Collection<byte[]> columns) { if (!columns.isEmpty()) { Iterable colnameConditions = Iterables.limit(Iterables.cycle("col_name = ?"), columns.size()); queryBuilder.append(" AND (" + Joiner.on(" OR ").join(colnameConditions) + ") "); queryBuilder.addAllArgs(columns); } return this; }
RangePredicateHelper { public RangePredicateHelper columnSelection(Collection<byte[]> columns) { if (!columns.isEmpty()) { Iterable colnameConditions = Iterables.limit(Iterables.cycle("col_name = ?"), columns.size()); queryBuilder.append(" AND (" + Joiner.on(" OR ").join(colnameConditions) + ") "); queryBuilder.addAllArgs(columns); } return this; } }
RangePredicateHelper { public RangePredicateHelper columnSelection(Collection<byte[]> columns) { if (!columns.isEmpty()) { Iterable colnameConditions = Iterables.limit(Iterables.cycle("col_name = ?"), columns.size()); queryBuilder.append(" AND (" + Joiner.on(" OR ").join(colnameConditions) + ") "); queryBuilder.addAllArgs(columns); } return this; } private  RangePredicateHelper(boolean reverse,
                                 TupleComparisonStrategy tupleComparisonStrategy,
                                 FullQuery.Builder queryBuilder); }
RangePredicateHelper { public RangePredicateHelper columnSelection(Collection<byte[]> columns) { if (!columns.isEmpty()) { Iterable colnameConditions = Iterables.limit(Iterables.cycle("col_name = ?"), columns.size()); queryBuilder.append(" AND (" + Joiner.on(" OR ").join(colnameConditions) + ") "); queryBuilder.addAllArgs(columns); } return this; } private  RangePredicateHelper(boolean reverse,
                                 TupleComparisonStrategy tupleComparisonStrategy,
                                 FullQuery.Builder queryBuilder); static RangePredicateHelper create(boolean reverse, DBType dbType, FullQuery.Builder builder); RangePredicateHelper startRowInclusive(byte[] startRow); RangePredicateHelper startCellInclusive(byte[] startRow, byte[] startCol); RangePredicateHelper startCellTsInclusive(byte[] startRow, byte[] startCol, @Nullable Long startTs); RangePredicateHelper endRowExclusive(byte[] endExclusive); RangePredicateHelper columnSelection(Collection<byte[]> columns); }
RangePredicateHelper { public RangePredicateHelper columnSelection(Collection<byte[]> columns) { if (!columns.isEmpty()) { Iterable colnameConditions = Iterables.limit(Iterables.cycle("col_name = ?"), columns.size()); queryBuilder.append(" AND (" + Joiner.on(" OR ").join(colnameConditions) + ") "); queryBuilder.addAllArgs(columns); } return this; } private  RangePredicateHelper(boolean reverse,
                                 TupleComparisonStrategy tupleComparisonStrategy,
                                 FullQuery.Builder queryBuilder); static RangePredicateHelper create(boolean reverse, DBType dbType, FullQuery.Builder builder); RangePredicateHelper startRowInclusive(byte[] startRow); RangePredicateHelper startCellInclusive(byte[] startRow, byte[] startCol); RangePredicateHelper startCellTsInclusive(byte[] startRow, byte[] startCol, @Nullable Long startTs); RangePredicateHelper endRowExclusive(byte[] endExclusive); RangePredicateHelper columnSelection(Collection<byte[]> columns);  }