public interface QueryFactory
SELECT statements). This factory may
be obtained from SQLVendor.SQLVendor,
QueryExpression,
QuerySpecification| Modifier and Type | Method and Description |
|---|---|
QueryExpression |
callFunction(SQLFunctionLiteral function)
Returns a query for calling a SQL function without a schema.
|
QueryExpression |
callFunction(String schemaName,
SQLFunctionLiteral function)
Returns a query for calling a SQL function with schema.
|
ColumnsBuilder |
columnsBuilder()
Creates a builder for the columns in
SELECT expressions. |
ColumnsBuilder |
columnsBuilder(SetQuantifier setQuantifier)
Creates a builder for columns in
SELECT expressions, which has specified set quantifier initially. |
QueryExpression |
createQuery(QueryExpressionBody body)
Creates new query, which has the specified body as an actual query.
|
FromBuilder |
fromBuilder()
Creates a builder for
FROM clause. |
GroupByBuilder |
groupByBuilder()
Creates a builder for
GROUP BY clause. |
OrdinaryGroupingSet |
groupingElement(NonBooleanExpression... expressions)
Creates a new grouping element, which has some expressions as grouping columns.
|
LimitSpecification |
limit(NonBooleanExpression count)
Creates a new
FETCH FIRST <n> ROWS ONLY syntax element for query. |
OffsetSpecification |
offset(NonBooleanExpression offset)
Creates a new
OFFSET <n> ROWS syntax element for query. |
OrderByBuilder |
orderByBuilder()
Creates a builder for
ORDER BY clause. |
QueryBuilder |
queryBuilder()
Creates a builder to build queries with capability for
UNION, INTERSECT, and EXCEPT set
operations. |
QueryBuilder |
queryBuilder(QueryExpressionBody query)
Creates a builder to build queries with capability for
UNION, INTERSECT, and EXCEPT set
operations. |
QuerySpecificationBuilder |
querySpecificationBuilder()
Creates a builder to build query specifications (
SELECT expressions). |
RowDefinition |
row(ValueExpression... elements)
Creates a new row for
VALUES expression in query. |
RowSubQuery |
rowSubQuery(QueryExpression subQuery)
Creates a new subquery for a row for
VALUES expression in query. |
SimpleQueryBuilder |
simpleQueryBuilder()
Creates a builder for simple queries.
|
SortSpecification |
sortSpec(ValueExpression expression,
Ordering ordering)
Creates a new sort specification for
ORDER BY clause. |
TableValueConstructor |
values(RowValueConstructor... rows)
Creates a new
VALUES expression in query. |
QueryExpression createQuery(QueryExpressionBody body)
body - The actual query to use.QueryExpressionQuerySpecificationBuilder querySpecificationBuilder()
SELECT expressions).QuerySpecificationBuilder.ColumnsBuilder columnsBuilder()
Creates a builder for the columns in SELECT expressions.
Calling this method is equivalent to calling columnsBuilder(SetQuantifier) and passing
SetQuantifier.ALL as argument.
ColumnsBuilder.ColumnsBuilder columnsBuilder(SetQuantifier setQuantifier)
SELECT expressions, which has specified set quantifier initially.setQuantifier - The set quantifier to use.ColumnsBuilder.QueryBuilder queryBuilder()
Creates a builder to build queries with capability for UNION, INTERSECT, and EXCEPT set
operations.
Calling this method is equivalent in calling queryBuilder(QueryExpressionBody) and passing
QueryExpressionBody.EmptyQueryExpressionBody as argument.
QueryBuilder.QueryBuilder queryBuilder(QueryExpressionBody query)
UNION, INTERSECT, and EXCEPT set
operations.query - The initial query for builder.QueryBuilder.GroupByBuilder groupByBuilder()
GROUP BY clause.GroupByBuilder.FromBuilder fromBuilder()
FROM clause.FromBuilder.OrdinaryGroupingSet groupingElement(NonBooleanExpression... expressions)
expressions - The expressions to use.OrdinaryGroupingSet.GroupByClauseSortSpecification sortSpec(ValueExpression expression, Ordering ordering)
ORDER BY clause.expression - The expression for column.ordering - The ordering to use.SortSpecification.OrderByBuilder orderByBuilder()
ORDER BY clause.OrderByBuilder.SimpleQueryBuilder simpleQueryBuilder()
SimpleQueryBuilder.TableValueConstructor values(RowValueConstructor... rows)
VALUES expression in query.rows - The rows for VALUES expression.TableValueConstructor.RowValueConstructor,
RowSubQuery,
RowDefinitionRowSubQuery rowSubQuery(QueryExpression subQuery)
VALUES expression in query.subQuery - The query to return the row.RowSubQuery.RowDefinition row(ValueExpression... elements)
VALUES expression in query.elements - The elements for the row.RowDefinition.QueryExpression callFunction(String schemaName, SQLFunctionLiteral function)
SELECT * FROM schemaName.functionName(params...).schemaName - The name of the schema where SQL function resides.function - The SQL function to call.QueryExpression callFunction(SQLFunctionLiteral function)
SELECT * FROM functionName(params...). Calling this method is equivalent to calling
callFunction(String, SQLFunctionLiteral) and passing null as first argument.function - The function to call.OffsetSpecification offset(NonBooleanExpression offset)
OFFSET <n> ROWS syntax element for query.offset - The offset amount.OFFSET <n> ROWS syntax element.LimitSpecification limit(NonBooleanExpression count)
FETCH FIRST <n> ROWS ONLY syntax element for query.count - The limit amount.FETCH FIRST <n> ROWS ONLY syntax element.Copyright © 2010-2012. All Rights Reserved.