Top Description Methods
org.jooq

public Interface SelectQuery<R extends org.jooq.Record>

extends Select<R extends Record>, ConditionProvider
Known Direct Implementers
org.jooq.impl.SelectQueryImpl
Static Imports
org.jooq.SQLDialect.CUBRID, .SQLDialect.DERBY, .SQLDialect.FIREBIRD, .SQLDialect.H2, .SQLDialect.HSQLDB, .SQLDialect.IGNITE, .SQLDialect.MARIADB, .SQLDialect.MYSQL, .SQLDialect.POSTGRES, .SQLDialect.SQLITE, .SQLDialect.YUGABYTEDB

Deprecated

as a consequence of ConditionProvider being deprecated. See corresponding docs for further information.

A SELECT statement (model API).

This type is the model API representation of a Select statement, which can be mutated after creation. The advantage of this API compared to the DSL API is a more simple approach to writing dynamic SQL.

Instances can be created using DSLContext#selectQuery() and overloads.

Author
Lukas Eder

Method Summary

Modifier and TypeMethod and Description
public void
addConditions(Condition
The condition
condition
)

Redeclares org.jooq.ConditionProvider.addConditions.

Deprecated as a consequence of Condition being deprecated.
Adds a new condition to the query, connecting them to existing conditions with Operator#AND.
public void
addConditions(Condition...
The condition
conditions
)

Redeclares org.jooq.ConditionProvider.addConditions.

Deprecated as a consequence of Condition being deprecated.
Adds new conditions to the query, connecting them to existing conditions with Operator#AND.
public void
addConditions(Collection<? extends Condition>
The condition
conditions
)

Redeclares org.jooq.ConditionProvider.addConditions.

Adds new conditions to the query, connecting them to existing conditions with Operator#AND.
public void
addConditions(Operator operator, Condition
The condition
condition
)

Redeclares org.jooq.ConditionProvider.addConditions.

Deprecated as a consequence of Condition being deprecated.
Adds a new condition to the query, connecting them to existing conditions with the provided operator.
public void
addConditions(Operator operator, Condition...
The condition
conditions
)

Redeclares org.jooq.ConditionProvider.addConditions.

Deprecated as a consequence of Condition being deprecated.
Adds new conditions to the query, connecting them to existing conditions with the provided operator.
public void
addConditions(Operator operator, Collection<? extends Condition>
The condition
conditions
)

Redeclares org.jooq.ConditionProvider.addConditions.

Adds new conditions to the query, connecting them to existing conditions with the provided operator.
public void
addDistinctOn(SelectFieldOrAsterisk... fields)

Add a PostgreSQL-specific DISTINCT ON (fields…) clause.

public void
addDistinctOn(Collection<? extends SelectFieldOrAsterisk> fields)

Add a PostgreSQL-specific DISTINCT ON (fields…) clause.

public void
addFrom(TableLike<?>
The added tables
from
)

Add tables to the table product.

public void
addFrom(TableLike<?>...
The added tables
from
)

Add tables to the table product.

public void
addFrom(Collection<? extends TableLike<?>>
The added tables
from
)

Add tables to the table product.

public void
addGroupBy(GroupField...
The grouping fields
fields
)

Adds grouping fields.

public void
addGroupBy(Collection<? extends GroupField>
The grouping fields
fields
)

Adds grouping fields.

public void
addHaving(Condition
The condition
condition
)

Deprecated as a consequence of Condition being deprecated.
Adds a new condition to the having clause of the query, connecting it with each other with Operator#AND.
public void
addHaving(Condition...
The condition
conditions
)

Deprecated as a consequence of Condition being deprecated.
Adds new conditions to the having clause of the query, connecting them with each other with Operator#AND.
public void
addHaving(Collection<? extends Condition>
The condition
conditions
)

Adds new conditions to the having clause of the query, connecting them with each other with Operator#AND.

public void
addHaving(Operator
The operator to use to add the conditions to the existing conditions
operator
,
Condition
The condition
condition
)

Deprecated as a consequence of Condition being deprecated.
Adds a new condition to the having clause of query, connecting it with each other with operator.
public void
addHaving(Operator
The operator to use to add the conditions to the existing conditions
operator
,
Condition...
The condition
conditions
)

Deprecated as a consequence of Condition being deprecated.
Adds new conditions to the having clause of query, connecting them with each other with operator.
public void
addHaving(Operator
The operator to use to add the conditions to the existing conditions
operator
,
Collection<? extends Condition>
The condition
conditions
)

Adds new conditions to the having clause of query, connecting them with each other with operator.

public void
addHint(String hint)

Add an Oracle-style hint to the select clause.

public void
addJoin(TableLike<?>
The joined table
table
,
Condition
The joining condition
condition
)

Deprecated as a consequence of Condition being deprecated.
Joins the existing table product to a new table using a condition, connecting them with each other with Operator#AND.
public void
addJoin(TableLike<?>
The joined table
table
,
Condition...
The joining conditions
conditions
)

Deprecated as a consequence of Condition being deprecated.
Joins the existing table product to a new table using a condition, connecting them with each other with Operator#AND.
public void
addJoin(TableLike<?>
The joined table
table
,
JoinType
The type of join
type
,
Condition
The joining condition
condition
)

Deprecated as a consequence of Condition being deprecated.
Joins the existing table product to a new table using a condition, connecting them with each other with Operator#AND.
public void
addJoin(TableLike<?>
The joined table
table
,
JoinType
The type of join
type
,
Condition...
The joining conditions
conditions
)

Deprecated as a consequence of Condition being deprecated.
Joins the existing table product to a new table using a condition, connecting them with each other with Operator#AND.
public void
addJoinOnKey(TableLike<?>
The joined table
table
,
JoinType
The type of join
type
)

Joins the existing table product to a new table using a foreign key.

public void
addJoinOnKey(TableLike<?>
The joined table
table
,
JoinType
The type of join
type
,
TableField<?, ?>...
The foreign key fields
keyFields
)

Deprecated as a consequence of TableField being deprecated.
Joins the existing table product to a new table using a foreign key.
public void
addJoinOnKey(TableLike<?>
The joined table
table
,
JoinType
The type of join
type
,
ForeignKey<?, ?>
The foreign key
key
)

Joins the existing table product to a new table using a foreign key.

public void
addJoinUsing(TableLike<?>
The joined table
table
,
Collection<? extends Field<?>>
The fields for the USING clause
fields
)

Joins the existing table product to a new table with a USING clause.

public void
addJoinUsing(TableLike<?>
The joined table
table
,
JoinType
The type of join
type
,
Collection<? extends Field<?>>
The fields for the USING clause
fields
)

Joins the existing table product to a new table with a USING clause.

public void
addLimit(Number
The number of rows to return
numberOfRows
)

Limit the results of this select.

public void
addLimit(Field<? extends Number>
The number of rows to return
numberOfRows
)

Deprecated as a consequence of Field being deprecated.
Limit the results of this select.
public void
addLimit(Number
The lowest offset starting at 0
offset
,
Number
The number of rows to return
numberOfRows
)

Limit the results of this select.

public void
addLimit(Field<? extends Number>
The lowest offset starting at 0
offset
,
Number
The number of rows to return
numberOfRows
)

Deprecated as a consequence of Field being deprecated.
Limit the results of this select.
public void
addLimit(Number
The lowest offset starting at 0
offset
,
Field<? extends Number>
The number of rows to return
numberOfRows
)

Deprecated as a consequence of Field being deprecated.
Limit the results of this select.
public void
addLimit(Field<? extends Number>
The lowest offset starting at 0
offset
,
Field<? extends Number>
The number of rows to return
numberOfRows
)

Deprecated as a consequence of Field being deprecated.
Limit the results of this select.
public void
addOffset(Number offset)

Add a 0-based OFFSET clause to the query.

public void
addOffset(Field<? extends Number> offset)

Deprecated as a consequence of Field being deprecated.
Add a 0-based OFFSET clause to the query.
public void
addOption(String option)

Add a SQL Server-style query hint to the select clause.

public void
addOrderBy(OrderField<?>...
The ordering fields
fields
)

Adds ordering fields.

public void
addOrderBy(Collection<? extends OrderField<?>>
The ordering fields
fields
)

Adds ordering fields.

public void
addOrderBy(int...
The ordering fields
fieldIndexes
)

Adds ordering fields.

public void
addQualify(Condition
The condition
condition
)

Deprecated as a consequence of Condition being deprecated.
Adds a new condition to the qualify clause of the query, connecting it with each other with Operator#AND.
public void
addQualify(Condition...
The condition
conditions
)

Deprecated as a consequence of Condition being deprecated.
Adds new conditions to the qualify clause of the query, connecting them with each other with Operator#AND.
public void
addQualify(Collection<? extends Condition>
The condition
conditions
)

Adds new conditions to the qualify clause of the query, connecting them with each other with Operator#AND.

public void
addQualify(Operator
The operator to use to add the conditions to the existing conditions
operator
,
Condition
The condition
condition
)

Deprecated as a consequence of Condition being deprecated.
Adds a new condition to the qualify clause of query, connecting it with each other with operator.
public void
addQualify(Operator
The operator to use to add the conditions to the existing conditions
operator
,
Condition...
The condition
conditions
)

Deprecated as a consequence of Condition being deprecated.
Adds new conditions to the qualify clause of query, connecting them with each other with operator.
public void
addQualify(Operator
The operator to use to add the conditions to the existing conditions
operator
,
Collection<? extends Condition>
The condition
conditions
)

Adds new conditions to the qualify clause of query, connecting them with each other with operator.

public void
addSeekAfter(Field<?>...
The seeking fields
fields
)

Deprecated as a consequence of Field being deprecated.
Adds seeking fields.
public void
addSeekAfter(Collection<? extends Field<?>>
The seeking fields
fields
)

Adds seeking fields.

public void
addSeekBefore(Field<?>...
The seeking fields
fields
)

Deprecated - [#7461] - SEEK BEFORE is not implemented correctly
Adds seeking fields.
public void
addSeekBefore(Collection<? extends Field<?>>
The seeking fields
fields
)

Deprecated - [#7461] - SEEK BEFORE is not implemented correctly
Adds seeking fields.
public void
addSelect(SelectFieldOrAsterisk... fields)

Add a list of select fields.

public void
addSelect(Collection<? extends SelectFieldOrAsterisk> fields)

Add a list of select fields.

public void
addWindow(WindowDefinition...
The definitions
definitions
)

Deprecated as a consequence of WindowDefinition being deprecated.
Adds new window definitions to the window clause of the query.
public void
addWindow(Collection<? extends WindowDefinition>
The definitions
definitions
)

Adds new window definitions to the window clause of the query.

public void
setDistinct(boolean distinct)

Add "distinct" keyword to the select clause.

public void
setForKeyShare(boolean forKeyShare)

Sets the "FOR KEY SHARE" lock mode onto the query.

public void
setForLockModeNoWait()

Some RDBMS allow for specifying the locking mode for the applied FOR <lock_mode> clause.

public void
setForLockModeOf(Field<?>...
The fields that should be locked
fields
)

Deprecated as a consequence of Field being deprecated.
Some RDBMS allow for specifying the fields that should be locked by the FOR <lock_mode> clause, instead of the full row.
public void
setForLockModeOf(Collection<? extends Field<?>> fields)

Some RDBMS allow for specifying the fields that should be locked by the FOR <lock_mode> clause, instead of the full row.

public void
setForLockModeOf(Table<?>...
The tables that should be locked
tables
)

Some RDBMS allow for specifying the tables that should be locked by the FOR <lock_mode> clause, instead of the full row.

public void
setForLockModeSkipLocked()

Some RDBMS allow for specifying the locking mode for the applied FOR <lock_mode> clause.

public void
setForLockModeWait(int
The number of seconds to wait for a lock
seconds
)

Some RDBMS allow for specifying the locking mode for the applied FOR <lock_mode> clause.

public void
setForNoKeyUpdate(boolean forNoKeyUpdate)

Sets the "FOR NO KEY UPDATE" lock mode onto the query.

public void
setForShare(boolean
The flag's value
forShare
)

Sets the "FOR SHARE" lock mode onto the query.

public void
setForUpdate(boolean
The flag's value
forUpdate
)

Sets the "FOR UPDATE" lock mode onto the query.

public void
setForUpdateNoWait()

Deprecated for removal since 3.14. [#5218] - 3.14.0 - Use setForLockModeNoWait()
Some RDBMS allow for specifying the locking mode for the applied FOR UPDATE clause.
public void
setForUpdateOf(Field<?>...
The fields that should be locked
fields
)

Deprecated for removal since 3.14. [#5218] - 3.14.0 - Use setForLockModeOf(Field...)
Some RDBMS allow for specifying the fields that should be locked by the FOR UPDATE clause, instead of the full row.
public void
setForUpdateOf(Collection<? extends Field<?>> fields)

Deprecated for removal since 3.14. [#5218] - 3.14.0 - Use setForLockModeOf(Collection)
Some RDBMS allow for specifying the fields that should be locked by the FOR UPDATE clause, instead of the full row.
public void
setForUpdateOf(Table<?>...
The tables that should be locked
tables
)

Deprecated for removal since 3.14. [#5218] - 3.14.0 - Use setForLockModeOf(Table...)
Some RDBMS allow for specifying the tables that should be locked by the FOR UPDATE clause, instead of the full row.
public void
setForUpdateSkipLocked()

Deprecated for removal since 3.14. [#5218] - 3.14.0 - Use setForLockModeSkipLocked()
Some RDBMS allow for specifying the locking mode for the applied FOR UPDATE clause.
public void
setForUpdateWait(int
The number of seconds to wait for a lock
seconds
)

Deprecated for removal since 3.14. [#5218] - 3.14.0 - Use setForLockModeWait(int)
Some RDBMS allow for specifying the locking mode for the applied FOR UPDATE clause.
public void
setGroupByDistinct(boolean groupByDistinct)

Specifies the GROUP BY DISTINCT clause.

public void
setInto(Table<?> table)

Add a T-SQL style INTO clause to the SELECT statement to create a new table from a SELECT statement.

public void
setLimitPercent(boolean percent)

Add the PERCENT clause to a LIMIT clause.

public void
setWithCheckOption()

Add a WITH CHECK OPTION clause to the end of the subquery.

public void
setWithReadOnly()

Add a WITH READ ONLY clause to the end of the subquery.

public void
setWithTies(boolean withTies)

Add the WITH TIES clause to a LIMIT clause.

Inherited from org.jooq.Select:
$distinct$distinct$distinctOn$distinctOn$from$from$groupBy$groupBy$groupByDistinct$groupByDistinct$having$having$limit$limit$limitPercent$limitPercent$limitWithTies$limitWithTies$offset$offset$orderBy$orderBy$qualify$qualify$select$select$where$where$window$window$with$withexceptexceptAllgetSelectintersectintersectAllunionunionAll