Package | Description |
---|---|
com.j256.ormlite.dao |
Database Access Object classes.
|
com.j256.ormlite.stmt |
SQL statement generation and processing.
|
Modifier and Type | Method and Description |
---|---|
QueryBuilder<T,ID> |
BaseDaoImpl.queryBuilder() |
QueryBuilder<T,ID> |
Dao.queryBuilder()
Create and return a new query builder object which allows you to build a custom SELECT statement.
|
QueryBuilder<T,ID> |
RuntimeExceptionDao.queryBuilder() |
Modifier and Type | Method and Description |
---|---|
QueryBuilder<T,ID> |
QueryBuilder.distinct()
Add "DISTINCT" clause to the SQL query statement.
|
QueryBuilder<T,ID> |
QueryBuilder.groupBy(String columnName)
Add "GROUP BY" clause to the SQL query statement.
|
QueryBuilder<T,ID> |
QueryBuilder.groupByRaw(String rawSql)
Add a raw SQL "GROUP BY" clause to the SQL query statement.
|
QueryBuilder<T,ID> |
QueryBuilder.having(String having)
Add raw SQL "HAVING" clause to the SQL query statement.
|
QueryBuilder<T,ID> |
QueryBuilder.join(QueryBuilder<?,?> joinedQueryBuilder)
Join with another query builder.
|
QueryBuilder<T,ID> |
QueryBuilder.join(QueryBuilder<?,?> joinedQueryBuilder,
QueryBuilder.JoinType type,
QueryBuilder.JoinWhereOperation operation)
Like
join(QueryBuilder) but allows you to specify the join type and the operation used to combine the
WHERE statements. |
QueryBuilder<T,ID> |
QueryBuilder.join(String localColumnName,
String joinedColumnName,
QueryBuilder<?,?> joinedQueryBuilder)
Similar to
join(QueryBuilder) but this allows you to link two tables that share a field of the same
type. |
QueryBuilder<T,ID> |
QueryBuilder.join(String localColumnName,
String joinedColumnName,
QueryBuilder<?,?> joinedQueryBuilder,
QueryBuilder.JoinType type,
QueryBuilder.JoinWhereOperation operation)
Similar to
join(QueryBuilder, JoinType, JoinWhereOperation) but this allows you to link two tables that
share a field of the same type. |
QueryBuilder<T,ID> |
QueryBuilder.joinOr(QueryBuilder<?,?> joinedQueryBuilder)
Like
join(QueryBuilder) but this combines the WHERE statements of two query builders with a SQL "OR". |
QueryBuilder<T,ID> |
QueryBuilder.leftJoin(QueryBuilder<?,?> joinedQueryBuilder)
Similar to
join(QueryBuilder) but it will use "LEFT JOIN" instead. |
QueryBuilder<T,ID> |
QueryBuilder.leftJoinOr(QueryBuilder<?,?> joinedQueryBuilder)
Like
leftJoin(QueryBuilder) but this combines the WHERE statements of two query builders with a SQL
"OR". |
QueryBuilder<T,ID> |
QueryBuilder.limit(Long maxRows)
Limit the output to maxRows maximum number of rows.
|
QueryBuilder<T,ID> |
QueryBuilder.offset(Long startRow)
Start the output at this row number.
|
QueryBuilder<T,ID> |
QueryBuilder.orderBy(String columnName,
boolean ascending)
Add "ORDER BY" clause to the SQL query statement.
|
QueryBuilder<T,ID> |
QueryBuilder.orderByNullsFirst(String columnName,
boolean ascending)
Add "ORDER BY" clause to the SQL query statement with a column-name and ascending (if true) with a NULLS FIRST
qualifier.
|
QueryBuilder<T,ID> |
QueryBuilder.orderByNullsLast(String columnName,
boolean ascending)
Add "ORDER BY" clause to the SQL query statement with a column-name and ascending (if true) with a NULLS LAST
qualifier.
|
QueryBuilder<T,ID> |
QueryBuilder.orderByRaw(String rawSql)
Add raw SQL "ORDER BY" clause to the SQL query statement.
|
QueryBuilder<T,ID> |
QueryBuilder.orderByRaw(String rawSql,
ArgumentHolder... args)
Add raw SQL "ORDER BY" clause to the SQL query statement.
|
QueryBuilder<T,ID> |
Where.queryBuilder()
Returns the
QueryBuilder used to create this Where, if present |
QueryBuilder<T,ID> |
QueryBuilder.selectColumns(Iterable<String> columns)
Same as
selectColumns(String...) except the columns are specified as an iterable -- probably will be a
Collection . |
QueryBuilder<T,ID> |
QueryBuilder.selectColumns(String... columns)
Add columns to be returned by the SELECT query.
|
QueryBuilder<T,ID> |
QueryBuilder.selectRaw(String... columns)
Add raw columns or aggregate functions (COUNT, MAX, ...) to the query.
|
QueryBuilder<T,ID> |
QueryBuilder.setAlias(String alias)
Add an alias for this table.
|
QueryBuilder<T,ID> |
QueryBuilder.setCountOf(boolean countOf)
Set whether or not we should only return the count of the results.
|
QueryBuilder<T,ID> |
QueryBuilder.setCountOf(String countOfQuery)
Set the field that we are counting from the database.
|
Modifier and Type | Method and Description |
---|---|
Where<T,ID> |
Where.exists(QueryBuilder<?,?> subQueryBuilder)
Add a EXISTS clause with a sub-query inside of parenthesis.
|
Where<T,ID> |
Where.in(String columnName,
QueryBuilder<?,?> subQueryBuilder)
Add a IN clause which makes sure the column is in one of the columns returned from a sub-query inside of
parenthesis.
|
QueryBuilder<T,ID> |
QueryBuilder.join(QueryBuilder<?,?> joinedQueryBuilder)
Join with another query builder.
|
QueryBuilder<T,ID> |
QueryBuilder.join(QueryBuilder<?,?> joinedQueryBuilder,
QueryBuilder.JoinType type,
QueryBuilder.JoinWhereOperation operation)
Like
join(QueryBuilder) but allows you to specify the join type and the operation used to combine the
WHERE statements. |
QueryBuilder<T,ID> |
QueryBuilder.join(String localColumnName,
String joinedColumnName,
QueryBuilder<?,?> joinedQueryBuilder)
Similar to
join(QueryBuilder) but this allows you to link two tables that share a field of the same
type. |
QueryBuilder<T,ID> |
QueryBuilder.join(String localColumnName,
String joinedColumnName,
QueryBuilder<?,?> joinedQueryBuilder,
QueryBuilder.JoinType type,
QueryBuilder.JoinWhereOperation operation)
Similar to
join(QueryBuilder, JoinType, JoinWhereOperation) but this allows you to link two tables that
share a field of the same type. |
QueryBuilder<T,ID> |
QueryBuilder.joinOr(QueryBuilder<?,?> joinedQueryBuilder)
Like
join(QueryBuilder) but this combines the WHERE statements of two query builders with a SQL "OR". |
QueryBuilder<T,ID> |
QueryBuilder.leftJoin(QueryBuilder<?,?> joinedQueryBuilder)
Similar to
join(QueryBuilder) but it will use "LEFT JOIN" instead. |
QueryBuilder<T,ID> |
QueryBuilder.leftJoinOr(QueryBuilder<?,?> joinedQueryBuilder)
Like
leftJoin(QueryBuilder) but this combines the WHERE statements of two query builders with a SQL
"OR". |
Where<T,ID> |
Where.notIn(String columnName,
QueryBuilder<?,?> subQueryBuilder)
Same as
Where.in(String, QueryBuilder) except with a NOT IN clause. |
This documentation is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.