@Test public void testDistinct() throws Exception { QueryBuilder<Foo, Integer> qb = new QueryBuilder<Foo, Integer>(databaseType, baseFooTableInfo, null); qb.distinct(); StringBuilder sb = new StringBuilder(); sb.append("SELECT DISTINCT * FROM "); databaseType.appendEscapedEntityName(sb, baseFooTableInfo.getTableName()); sb.append(' '); assertEquals(sb.toString(), qb.prepareStatementString()); }
public QueryBuilder<T, ID> distinct() { distinct = true; selectIdColumn = false; return this; }
QueryBuilder extends StatementBuilder<T, ID> { public QueryBuilder<T, ID> distinct() { distinct = true; selectIdColumn = false; return this; } }
QueryBuilder extends StatementBuilder<T, ID> { public QueryBuilder<T, ID> distinct() { distinct = true; selectIdColumn = false; return this; } QueryBuilder(DatabaseType databaseType, TableInfo<T, ID> tableInfo, Dao<T, ID> dao); }
QueryBuilder extends StatementBuilder<T, ID> { public QueryBuilder<T, ID> distinct() { distinct = true; selectIdColumn = false; return this; } QueryBuilder(DatabaseType databaseType, TableInfo<T, ID> tableInfo, Dao<T, ID> dao); PreparedQuery<T> prepare(); QueryBuilder<T, ID> selectColumns(String... columns); QueryBuilder<T, ID> selectColumns(Iterable<String> columns); QueryBuilder<T, ID> selectRaw(String... columns); QueryBuilder<T, ID> groupBy(String columnName); QueryBuilder<T, ID> groupByRaw(String rawSql); QueryBuilder<T, ID> orderBy(String columnName, boolean ascending); QueryBuilder<T, ID> orderByRaw(String rawSql); QueryBuilder<T, ID> orderByRaw(String rawSql, ArgumentHolder... args); QueryBuilder<T, ID> distinct(); QueryBuilder<T, ID> limit(Long maxRows); QueryBuilder<T, ID> offset(Long startRow); QueryBuilder<T, ID> setCountOf(boolean countOf); QueryBuilder<T, ID> setCountOf(String countOfQuery); QueryBuilder<T, ID> having(String having); QueryBuilder<T, ID> join(QueryBuilder<?, ?> joinedQueryBuilder); QueryBuilder<T, ID> join(QueryBuilder<?, ?> joinedQueryBuilder, JoinType type, JoinWhereOperation operation); QueryBuilder<T, ID> joinOr(QueryBuilder<?, ?> joinedQueryBuilder); QueryBuilder<T, ID> leftJoin(QueryBuilder<?, ?> joinedQueryBuilder); QueryBuilder<T, ID> leftJoinOr(QueryBuilder<?, ?> joinedQueryBuilder); QueryBuilder<T, ID> join(String localColumnName, String joinedColumnName,
			QueryBuilder<?, ?> joinedQueryBuilder); QueryBuilder<T, ID> join(String localColumnName, String joinedColumnName,
			QueryBuilder<?, ?> joinedQueryBuilder, JoinType type, JoinWhereOperation operation); List<T> query(); GenericRawResults<String[]> queryRaw(); T queryForFirst(); String[] queryRawFirst(); CloseableIterator<T> iterator(); long countOf(); long countOf(String countOfQuery); QueryBuilder<T, ID> setAlias(String alias); @Override void reset(); }
QueryBuilder extends StatementBuilder<T, ID> { public QueryBuilder<T, ID> distinct() { distinct = true; selectIdColumn = false; return this; } QueryBuilder(DatabaseType databaseType, TableInfo<T, ID> tableInfo, Dao<T, ID> dao); PreparedQuery<T> prepare(); QueryBuilder<T, ID> selectColumns(String... columns); QueryBuilder<T, ID> selectColumns(Iterable<String> columns); QueryBuilder<T, ID> selectRaw(String... columns); QueryBuilder<T, ID> groupBy(String columnName); QueryBuilder<T, ID> groupByRaw(String rawSql); QueryBuilder<T, ID> orderBy(String columnName, boolean ascending); QueryBuilder<T, ID> orderByRaw(String rawSql); QueryBuilder<T, ID> orderByRaw(String rawSql, ArgumentHolder... args); QueryBuilder<T, ID> distinct(); QueryBuilder<T, ID> limit(Long maxRows); QueryBuilder<T, ID> offset(Long startRow); QueryBuilder<T, ID> setCountOf(boolean countOf); QueryBuilder<T, ID> setCountOf(String countOfQuery); QueryBuilder<T, ID> having(String having); QueryBuilder<T, ID> join(QueryBuilder<?, ?> joinedQueryBuilder); QueryBuilder<T, ID> join(QueryBuilder<?, ?> joinedQueryBuilder, JoinType type, JoinWhereOperation operation); QueryBuilder<T, ID> joinOr(QueryBuilder<?, ?> joinedQueryBuilder); QueryBuilder<T, ID> leftJoin(QueryBuilder<?, ?> joinedQueryBuilder); QueryBuilder<T, ID> leftJoinOr(QueryBuilder<?, ?> joinedQueryBuilder); QueryBuilder<T, ID> join(String localColumnName, String joinedColumnName,
			QueryBuilder<?, ?> joinedQueryBuilder); QueryBuilder<T, ID> join(String localColumnName, String joinedColumnName,
			QueryBuilder<?, ?> joinedQueryBuilder, JoinType type, JoinWhereOperation operation); List<T> query(); GenericRawResults<String[]> queryRaw(); T queryForFirst(); String[] queryRawFirst(); CloseableIterator<T> iterator(); long countOf(); long countOf(String countOfQuery); QueryBuilder<T, ID> setAlias(String alias); @Override void reset();  }