|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SelectQuery
A query for data selection
Method Summary | |
---|---|
void |
addConnectBy(Condition condition)
Add an Oracle-specific CONNECT BY clause to the query |
void |
addConnectByNoCycle(Condition condition)
Add an Oracle-specific CONNECT BY NOCYCLE clause to the
query |
void |
addFrom(Collection<? extends TableLike<?>> from)
Add tables to the table product |
void |
addFrom(TableLike<?>... from)
Add tables to the table product |
void |
addGroupBy(Collection<? extends Field<?>> fields)
Adds grouping fields |
void |
addGroupBy(Field<?>... fields)
Adds grouping fields |
void |
addHaving(Collection<Condition> conditions)
Adds new conditions to the having clause of the query, connecting it to existing conditions with the and operator. |
void |
addHaving(Condition... conditions)
Adds new conditions to the having clause of the query, connecting it to existing conditions with the and operator. |
void |
addHaving(Operator operator,
Collection<Condition> conditions)
Adds new conditions to the having clause of query, connecting them to existing conditions with the provided operator |
void |
addHaving(Operator operator,
Condition... conditions)
Adds new conditions to the having clause of query, connecting them to existing conditions with the provided operator |
void |
addHint(String hint)
Add an Oracle-style hint to the select clause Example:
Factory create = new Factory();
create.select(field1, field2)
.hint("/*+ALL_ROWS*/")
.from(table1)
.execute();
|
void |
addJoin(TableLike<?> table,
Condition... conditions)
Joins the existing table product to a new table using a condition |
void |
addJoin(TableLike<?> table,
JoinType type,
Condition... conditions)
Joins the existing table product to a new table using a condition |
void |
addJoinOnKey(TableLike<?> table,
JoinType type)
Joins the existing table product to a new table using a foreign key |
void |
addJoinOnKey(TableLike<?> table,
JoinType type,
ForeignKey<?,?> key)
Joins the existing table product to a new table using a foreign key |
void |
addJoinOnKey(TableLike<?> table,
JoinType type,
TableField<?,?>... keyFields)
Joins the existing table product to a new table using a foreign key |
void |
addJoinUsing(TableLike<?> table,
Collection<? extends Field<?>> fields)
Joins the existing table product to a new table with a USING
clause
If this is not supported by your RDBMS, then jOOQ will try to simulate
this behaviour using the information provided in this query. |
void |
addJoinUsing(TableLike<?> table,
JoinType type,
Collection<? extends Field<?>> fields)
Joins the existing table product to a new table with a USING
clause
If this is not supported by your RDBMS, then jOOQ will try to simulate
this behaviour using the information provided in this query. |
void |
addSelect(Collection<? extends Field<?>> fields)
Add a list of select fields |
void |
addSelect(Field<?>... fields)
Add a list of select fields |
void |
setConnectByStartWith(Condition condition)
Add an Oracle-specific START WITH clause to the query's
CONNECT BY clause |
void |
setDistinct(boolean distinct)
Add "distinct" keyword to the select clause |
Methods inherited from interface org.jooq.Select |
---|
except, getSelect, intersect, union, unionAll |
Methods inherited from interface org.jooq.ResultQuery |
---|
bind, bind, fetch, fetch, fetch, fetch, fetch, fetch, fetch, fetch, fetch, fetch, fetchAny, fetchArray, fetchArray, fetchArray, fetchArray, fetchArray, fetchArray, fetchArray, fetchArray, fetchArray, fetchArrays, fetchInto, fetchInto, fetchInto, fetchLater, fetchLater, fetchLazy, fetchLazy, fetchMany, fetchMap, fetchMap, fetchMaps, fetchOne, fetchOne, fetchOne, fetchOne, fetchOne, fetchOne, fetchOne, fetchOne, fetchOne, fetchOne, fetchOneArray, fetchOneMap, fetchResultSet, getRecordType, getResult |
Methods inherited from interface org.jooq.Query |
---|
execute, getBindValues, getParam, getParams, getSQL, getSQL |
Methods inherited from interface org.jooq.Attachable |
---|
attach |
Methods inherited from interface org.jooq.Adapter |
---|
internalAPI |
Methods inherited from interface org.jooq.TableLike |
---|
asTable, asTable |
Methods inherited from interface org.jooq.FieldLike |
---|
asField, asField |
Methods inherited from interface org.jooq.FieldProvider |
---|
getField, getField, getField, getFields, getIndex |
Methods inherited from interface org.jooq.ConditionProvider |
---|
addConditions, addConditions, addConditions, addConditions |
Methods inherited from interface org.jooq.OrderProvider |
---|
addLimit, addLimit, addLimit, addLimit, addLimit, addLimit, addOrderBy, addOrderBy, addOrderBy, addOrderBy |
Methods inherited from interface org.jooq.LockProvider |
---|
setForShare, setForUpdate, setForUpdateNoWait, setForUpdateOf, setForUpdateOf, setForUpdateOf, setForUpdateSkipLocked, setForUpdateWait |
Method Detail |
---|
void addSelect(Field<?>... fields)
fields
- void addSelect(Collection<? extends Field<?>> fields)
fields
- void setDistinct(boolean distinct)
void addFrom(TableLike<?>... from)
from
- The added tablesvoid addFrom(Collection<? extends TableLike<?>> from)
from
- The added tablesvoid addJoin(TableLike<?> table, Condition... conditions)
table
- The joined tableconditions
- The joining conditionsvoid addJoin(TableLike<?> table, JoinType type, Condition... conditions)
table
- The joined tabletype
- The type of joinconditions
- The joining conditionsvoid addJoinUsing(TableLike<?> table, Collection<? extends Field<?>> fields)
USING
clause
If this is not supported by your RDBMS, then jOOQ will try to simulate this behaviour using the information provided in this query.
table
- The joined tablefields
- The fields for the USING
clausevoid addJoinUsing(TableLike<?> table, JoinType type, Collection<? extends Field<?>> fields)
USING
clause
If this is not supported by your RDBMS, then jOOQ will try to simulate this behaviour using the information provided in this query.
table
- The joined tabletype
- The type of joinfields
- The fields for the USING
clausevoid addJoinOnKey(TableLike<?> table, JoinType type) throws DataAccessException
table
- The joined tabletype
- The type of join
DataAccessException
- If there is no non-ambiguous key definition
known to jOOQTableOnStep.onKey(ForeignKey)
void addJoinOnKey(TableLike<?> table, JoinType type, TableField<?,?>... keyFields) throws DataAccessException
table
- The joined tabletype
- The type of joinkeyFields
- The foreign key fields
DataAccessException
- If there is no non-ambiguous key definition
known to jOOQTableOnStep.onKey(ForeignKey)
void addJoinOnKey(TableLike<?> table, JoinType type, ForeignKey<?,?> key)
table
- The joined tabletype
- The type of joinkey
- The foreign keyTableOnStep.onKey(ForeignKey)
void addGroupBy(Field<?>... fields)
fields
- The grouping fieldsvoid addGroupBy(Collection<? extends Field<?>> fields)
fields
- The grouping fieldsvoid addHaving(Condition... conditions)
conditions
- The conditionvoid addHaving(Collection<Condition> conditions)
conditions
- The conditionvoid addHaving(Operator operator, Condition... conditions)
operator
- The operator to use to add the conditions to the existing
conditionsconditions
- The conditionvoid addHaving(Operator operator, Collection<Condition> conditions)
operator
- The operator to use to add the conditions to the existing
conditionsconditions
- The conditionvoid addHint(String hint)
Example:
Factory create = new Factory();
create.select(field1, field2)
.hint("/*+ALL_ROWS*/")
.from(table1)
.execute();
void addConnectBy(Condition condition)
CONNECT BY
clause to the query
void addConnectByNoCycle(Condition condition)
CONNECT BY NOCYCLE
clause to the
query
void setConnectByStartWith(Condition condition)
START WITH
clause to the query's
CONNECT BY
clause
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |