|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SimpleQueryBuilder
This is builder to quickly create simple queries, without the generic and not-so-easy-to-use methods of traditional
QuerySpecificationBuilder + QueryFactory style. Using this builder is generally not thread-safe.
| Method Summary | |
|---|---|
SimpleQueryBuilder |
as(String columnAlias)
Adds alias to the most recently added column. |
SimpleQueryBuilder |
from(TableName... tableNames)
Adds table names for FROM clause of this query. |
SimpleQueryBuilder |
groupBy(String... columns)
Adds GROUP BY columns for this query. |
SimpleQueryBuilder |
having(BooleanExpression groupingCondition)
Adds HAVING grouping condition for this query. |
SimpleQueryBuilder |
limit()
Adds the FETCH FIRST ROW ONLY expression for this query. |
SimpleQueryBuilder |
limit(Integer max)
Adds the FETCH FIRST <number> ROWS ONLY expression for this query. |
SimpleQueryBuilder |
limit(NonBooleanExpression max)
Adds the FETCH FIRST <number> ROWS ONLY expression for this query. |
SimpleQueryBuilder |
offset(Integer skip)
Adds the OFFSET <number> ROWS expression for this query. |
SimpleQueryBuilder |
offset(NonBooleanExpression skip)
Adds the OFFSET <number> ROWS expression for this query. |
SimpleQueryBuilder |
orderByAsc(String... columns)
Adds ORDER BY columns for this query, with ASC as ordering specification. |
SimpleQueryBuilder |
orderByDesc(String... columns)
Adds ORDER BY columns for this query, with DESC as ordering specification. |
SimpleQueryBuilder |
select(String... columnNames)
Adds the specified columns to the SELECT list. |
SimpleQueryBuilder |
select(ValueExpression... expressions)
Adds the specified column expressions to the SELECT list. |
SimpleQueryBuilder |
selectAllColumns()
Selects all columns ( SELECT *). |
SimpleQueryBuilder |
where(BooleanExpression searchCondition)
Sets the search condition ( WHERE clause) for this query. |
| Methods inherited from interface org.sql.generation.api.grammar.builders.AbstractBuilder |
|---|
createExpression |
| Method Detail |
|---|
SimpleQueryBuilder select(String... columnNames)
SELECT list.
columnNames - The names of the columns.
SimpleQueryBuilder select(ValueExpression... expressions)
SELECT list.
expressions - The value expressions for columns.
SimpleQueryBuilder selectAllColumns()
SELECT *).
SimpleQueryBuilder as(String columnAlias)
columnAlias - The alias for most recently added column;
SimpleQueryBuilder from(TableName... tableNames)
FROM clause of this query.
tableNames - The table names to add.
SimpleQueryBuilder where(BooleanExpression searchCondition)
WHERE clause) for this query.
searchCondition - The search condition for this query.
SimpleQueryBuilder groupBy(String... columns)
GROUP BY columns for this query.
columns - The column names for GROUP BY clause.
SimpleQueryBuilder having(BooleanExpression groupingCondition)
HAVING grouping condition for this query.
groupingCondition - The grouping condition for this query.
SimpleQueryBuilder orderByAsc(String... columns)
ORDER BY columns for this query, with ASC as ordering specification.
columns - The column names for ORDER BY.
SimpleQueryBuilder orderByDesc(String... columns)
ORDER BY columns for this query, with DESC as ordering specification.
columns - The column names for ORDER BY.
SimpleQueryBuilder limit()
AbstractQueryBuilderFETCH FIRST ROW ONLY expression for this query. The resulting LimitSpecification will
have its count as null.
limit in interface AbstractQueryBuilder<QueryExpression>SimpleQueryBuilder limit(Integer max)
AbstractQueryBuilderFETCH FIRST <number> ROWS ONLY expression for this query. Calling this method is equivalent of
calling AbstractQueryBuilder.limit(NonBooleanExpression) and passing the NumericLiteral representing the given number
as the parameter.
limit in interface AbstractQueryBuilder<QueryExpression>max - The maximum amount of rows for this query to return. Use null to remove the
FETCH FIRST <number> ROWS ONLY expression.
SimpleQueryBuilder limit(NonBooleanExpression max)
AbstractQueryBuilderFETCH FIRST <number> ROWS ONLY expression for this query.
limit in interface AbstractQueryBuilder<QueryExpression>max - The maximum amount of rows for this query to return. May be subquery or something else that evaluates
to number or NULL. Use null to remove the FETCH FIRST <number> ROWS ONLY
expression.
SimpleQueryBuilder offset(Integer skip)
AbstractQueryBuilderOFFSET <number> ROWS expression for this query. Calling this method is equivalen of calling
AbstractQueryBuilder.offset(NonBooleanExpression) and passing the NumericLiteral representing the given number as the
parameter.
offset in interface AbstractQueryBuilder<QueryExpression>skip - The amount of rows to skip before starting to include them into this query. Use null to
remove the OFFSET <number> ROWS expression.
SimpleQueryBuilder offset(NonBooleanExpression skip)
AbstractQueryBuilderOFFSET <number> ROWS expression for this query.
offset in interface AbstractQueryBuilder<QueryExpression>skip - The amount of rows to skip before starting to include them into this query. May be subquery or
something else that evaluates to number or NULL. Use null to remove the
OFFSET <number> ROWS expression.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||