public class Select extends QueryBuilder
SELECT queries.| Modifier | Constructor and Description |
|---|---|
protected |
Select() |
| Modifier and Type | Method and Description |
|---|---|
Select |
average(java.lang.String column,
java.lang.String alias)
Adds the average value of the given
column to include in the query results
and specifies a name for it in the query output. |
Query |
build()
Builds a SQL statement and abstracts it in a
Query object ready for execution. |
Select |
column(java.lang.String column,
java.lang.String alias)
Adds the given
column to include in the query results and
specifies a name for the column in the query output. |
Select |
columns()
Adds all columns (
*) to include in the query results. |
Select |
columns(java.lang.String... columns)
Adds the given
columns to include in the query results. |
Select |
count(java.lang.String alias)
Adds the total number of rows to include in the query results and specifies a name
for it in the query output.
|
Select |
count(java.lang.String column,
java.lang.String alias)
Adds the count of the number of times the given
column
that is not NULL in a group to include in the query results
and specifies a name for it in the query output. |
Select |
distinct()
Excludes duplicates of any rows from the query results.
|
Select |
from(java.lang.Class<?>... tables)
Specifies one or more tables containing the data that the query retrieves from.
|
Select |
from(java.lang.Class<?> table,
java.lang.String alias)
Specifies one or more tables containing the data that the query retrieves from.
|
Select |
from(java.lang.String... tables)
Specifies one or more tables containing the data that the query retrieves from.
|
Select |
from(java.lang.String table,
java.lang.String alias)
Specifies one or more tables containing the data that the query retrieves from.
|
Select |
groupBy(java.lang.String... columns)
Specifies one or more columns used to group rows returned by the
|
Select |
having(Predicate predicate)
Specifies the conditions that determines the groups included in the query result set.
|
Select |
join(java.lang.Class<?> table,
Predicate predicate)
Filters query results that contain only rows from the given
table
that match one ore more rows in other tables. |
Select |
join(java.lang.Class<?> table,
java.lang.String alias,
Predicate predicate)
Filters query results that contain only rows from the given
table
that match one ore more rows in other tables. |
Select |
join(java.lang.String table,
Predicate predicate)
Filters query results that contain only rows from the given
table
that match one ore more rows in other tables. |
Select |
join(java.lang.String table,
java.lang.String alias,
Predicate predicate)
Filters query results that contain only rows from the given
table
that match one ore more rows in other tables. |
Select |
leftJoin(java.lang.Class<?> table,
Predicate predicate)
Filters query results that contain all rows from the tables before and
only matching rows from the given
table. |
Select |
leftJoin(java.lang.Class<?> table,
java.lang.String alias,
Predicate predicate)
Filters query results that contain all rows from the tables before and
only matching rows from the given
table. |
Select |
leftJoin(java.lang.String table,
Predicate predicate)
Filters query results that contain all rows from the tables before and
only matching rows from the given
table. |
Select |
leftJoin(java.lang.String table,
java.lang.String alias,
Predicate predicate)
Filters query results that contain all rows from the tables before and
only matching rows from the given
table. |
Select |
limit(int limit)
Specifies an upper bound on the number of rows returned by the
|
Select |
max(java.lang.String column,
java.lang.String alias)
Adds the maximum value of the given
column to include in the query results
and specifies a name for it in the query output. |
Select |
min(java.lang.String column,
java.lang.String alias)
Adds the minimum value of the given
column to include in the query results
and specifies a name for it in the query output. |
Select |
offset(int offset)
Omits the first
offset rows from the query result set. |
Select |
orderBy(java.lang.String... columns)
Specifies one or more items used to sort the final query result set and the order
for sorting the results.
|
Select |
orderBy(java.lang.String column,
boolean descending)
Specifies one or more items used to sort the final query result set and the order for sorting the results.
|
Select |
rightJoin(java.lang.Class<?> table,
Predicate predicate)
Filters query results that contain only matching rows from the given
table
and all rows from the tables before. |
Select |
rightJoin(java.lang.Class<?> table,
java.lang.String alias,
Predicate predicate)
Filters query results that contain only matching rows from the given
table
and all rows from the tables before. |
Select |
rightJoin(java.lang.String table,
Predicate predicate)
Filters query results that contain only matching rows from the given
table
and all rows from the tables before. |
Select |
rightJoin(java.lang.String table,
java.lang.String alias,
Predicate predicate)
Filters query results that contain only matching rows from the given
table
and all rows from the tables before. |
Select |
sum(java.lang.String column,
java.lang.String alias)
Adds the total value of the given
column to include in the query results
and specifies a name for it in the query output. |
Select |
where(Predicate predicate)
Specifies filter conditions that determine the rows that the query returns.
|
getTableNamepublic Select columns()
*) to include in the query results.Select object for further query construction.public Select columns(java.lang.String... columns)
columns to include in the query results.
Each item in the list generates one column in the query results.
columns - the columns to include in the query results.Select object for further query construction.public Select column(java.lang.String column, java.lang.String alias)
column to include in the query results and
specifies a name for the column in the query output.column - the column to include in the query results.alias - the name for the column in the query output.Select object for further query construction.public Select count(java.lang.String column, java.lang.String alias)
column
that is not NULL in a group to include in the query results
and specifies a name for it in the query output.column - the column to include in the query results.alias - the name for the column in the query output.Select object for further query construction.public Select count(java.lang.String alias)
alias - the name for the column in the query output.Select object for further query construction.public Select average(java.lang.String column, java.lang.String alias)
column to include in the query results
and specifies a name for it in the query output.
The result of SQLite AVG() is always a double value.
column - the column to include in the query results.alias - the name for the column in the query output.Select object for further query construction.public Select min(java.lang.String column, java.lang.String alias)
column to include in the query results
and specifies a name for it in the query output.column - the column to include in the query results.alias - the name for the column in the query output.Select object for further query construction.public Select max(java.lang.String column, java.lang.String alias)
column to include in the query results
and specifies a name for it in the query output.column - the column to include in the query results.alias - the name for the column in the query output.Select object for further query construction.public Select sum(java.lang.String column, java.lang.String alias)
column to include in the query results
and specifies a name for it in the query output.column - the column to include in the query results.alias - the name for the column in the query output.Select object for further query construction.public Select distinct()
Select object for further query construction.public Select from(java.lang.Class<?>... tables)
tables - the names of tables containing the data that the query retrieves from.Select object for further query construction.public Select from(java.lang.String... tables)
tables - the names of tables containing the data that the query retrieves from.Select object for further query construction.public Select from(java.lang.Class<?> table, java.lang.String alias)
table - the name of table containing the data that the query retrieves from.alias - an alias for the table specified.Select object for further query construction.public Select from(java.lang.String table, java.lang.String alias)
table - the name of table containing the data that the query retrieves from.alias - an alias for the table specified.Select object for further query construction.public Select join(java.lang.Class<?> table, Predicate predicate)
table
that match one ore more rows in other tables.table - the table to join.predicate - the condition on which tables are joined.Select object for further query construction.public Select join(java.lang.String table, Predicate predicate)
table
that match one ore more rows in other tables.table - the table to join.predicate - the condition on which tables are joined.Select object for further query construction.public Select join(java.lang.Class<?> table, java.lang.String alias, Predicate predicate)
table
that match one ore more rows in other tables.table - the table to join.alias - the alias of the given table.predicate - the condition on which tables are joined.Select object for further query construction.public Select join(java.lang.String table, java.lang.String alias, Predicate predicate)
table
that match one ore more rows in other tables.table - the table to join.alias - the alias of the given table.predicate - the condition on which tables are joined.Select object for further query construction.public Select leftJoin(java.lang.Class<?> table, Predicate predicate)
table.table - the table to join.predicate - the condition on which tables are joined.Select object for further query construction.public Select leftJoin(java.lang.String table, Predicate predicate)
table.table - the table to join.predicate - the condition on which tables are joined.Select object for further query construction.public Select leftJoin(java.lang.Class<?> table, java.lang.String alias, Predicate predicate)
table.table - the table to join.alias - the alias of the given table.predicate - the condition on which tables are joined.Select object for further query construction.public Select leftJoin(java.lang.String table, java.lang.String alias, Predicate predicate)
table.table - the table to join.alias - the alias of the given table.predicate - the condition on which tables are joined.Select object for further query construction.public Select rightJoin(java.lang.Class<?> table, Predicate predicate)
table
and all rows from the tables before.table - the table to join.predicate - the condition on which tables are joined.Select object for further query construction.public Select rightJoin(java.lang.String table, Predicate predicate)
table
and all rows from the tables before.table - the table to join.predicate - the condition on which tables are joined.Select object for further query construction.public Select rightJoin(java.lang.Class<?> table, java.lang.String alias, Predicate predicate)
table
and all rows from the tables before.table - the table to join.alias - the alias of the given table.predicate - the condition on which tables are joined.Select object for further query construction.public Select rightJoin(java.lang.String table, java.lang.String alias, Predicate predicate)
table
and all rows from the tables before.table - the table to join.alias - the alias of the given table.predicate - the condition on which tables are joined.Select object for further query construction.public Select where(Predicate predicate)
where(Predicate) must not be called after calling having(Predicate).
predicate - the conditions on which the tables are joined.Select object for further query construction.public Select groupBy(java.lang.String... columns)
columns - one or more columns used to group rows returned by theSelect object for further query construction.public Select having(Predicate predicate)
where(Predicate) must not be called after calling having(Predicate).
predicate - the conditions that determines the groups included in theSelect object for further query construction.public Select orderBy(java.lang.String... columns)
columns - the items used to sort the final query result set.Select object for further query construction.public Select orderBy(java.lang.String column, boolean descending)
column - the item used to sort the final query result set.descending - true if the item is to be sorted in descending order;
otherwise, false.Select object for further query construction.public Select limit(int limit)
limit - an upper bound on the number of rows returned by theSelect object for further query construction.public Select offset(int offset)
offset rows from the query result set.offset - the number of rows to omit from the start of the query result set.Select object for further query construction.public Query build()
Query object ready for execution.build in class QueryBuilderQuery object ready for execution.