Deprecated
as a consequence of Field being deprecated. See corresponding docs for further information.
Conditions can be used in a variety of SQL clauses. They're mainly used in a
Select statement's WHERE clause, but can also appear in
(non-exhaustive list):
SELECT … WHERE, e.g. via
SelectWhereStep#where(Condition)SELECT … HAVING, e.g. via
SelectHavingStep#having(Condition)CASE expression, e.g. via DSL#case_() and
Case#when(Condition, Field)DSL#field(Condition)AggregateFilterStep#filterWhere(Condition)Example:
// Assuming import static org.jooq.impl.DSL.*;
using(configuration)
.select()
.from(ACTOR)
.where(ACTOR.ACTOR_ID.eq(1)) // The eq operator produces a Condition from two Fields
.fetch();
Instances can be created using DSL#condition(Field) and overloads, or
by calling a comparison operator method on Field, such as
Field#eq(Field).
| Modifier and Type | Method and Description |
|---|---|
| public @NotNull Condition | |
| public @NotNull Condition | Returns: The combined conditionThe other condition sql)
Deprecated
as a consequence of
Combine this condition with another one using the Condition being deprecated.
Operator#AND
operator.
|
| public @NotNull Condition | Returns: The combined conditionThe other condition sql)
Deprecated
as a consequence of
Combine this condition with another one using the Condition being deprecated.
Operator#AND
operator.
|
| public @NotNull Condition | Returns: The combined conditionThe other condition sql, Object... The bindings bindings)
Deprecated
as a consequence of
Combine this condition with another one using the Condition being deprecated.
Operator#AND
operator.
|
| public @NotNull Condition | Returns: The combined conditionThe SQL clause, containing {numbered placeholders} where query
parts can be injected sql, QueryPart... The parts)QueryPart objects that are rendered at the
{numbered placeholder} locations
Deprecated
as a consequence of
Combine this condition with another one using the Condition being deprecated.
Operator#AND
operator.
|
| public @NotNull Condition | |
| public @NotNull Condition | Returns: The combined conditionThe EXISTS's subquery select)
Deprecated
as a consequence of
Combine this condition with an EXISTS clause using the
Condition being deprecated.
Operator#AND operator.
|
| public @NotNull Condition | Returns: The combined conditionThe other condition other)
Deprecated
as a consequence of
Combine this condition with a negated other one using the
Condition being deprecated.
Operator#AND operator.
|
| public @NotNull Condition | |
| public @NotNull Condition | Returns: The combined conditionThe EXISTS's subquery select)
Deprecated
as a consequence of
Combine this condition with a NOT EXIST clause using the
Condition being deprecated.
Operator#AND operator.
|
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | Returns: The combined conditionThe other condition sql)
Deprecated
as a consequence of
Combine this condition with another one using the Condition being deprecated.
Operator#OR
operator.
|
| public @NotNull Condition | Returns: The combined conditionThe other condition sql)
Deprecated
as a consequence of
Combine this condition with another one using the Condition being deprecated.
Operator#OR
operator.
|
| public @NotNull Condition | Returns: The combined conditionThe other condition sql, Object... The bindings bindings)
Deprecated
as a consequence of
Combine this condition with another one using the Condition being deprecated.
Operator#OR
operator.
|
| public @NotNull Condition | Returns: The combined conditionThe SQL clause, containing {numbered placeholders} where query
parts can be injected sql, QueryPart... The parts)QueryPart objects that are rendered at the
{numbered placeholder} locations
Deprecated
as a consequence of
Combine this condition with another one using the Condition being deprecated.
Operator#OR
operator.
|
| public @NotNull Condition | |
| public @NotNull Condition | Returns: The combined conditionThe EXISTS's subquery select)
Deprecated
as a consequence of
Combine this condition with an EXISTS clause using the
Condition being deprecated.
Operator#OR operator.
|
| public @NotNull Condition | Returns: The combined conditionThe other condition other)
Deprecated
as a consequence of
Combine this condition with a negated other one using the
Condition being deprecated.
Operator#OR operator.
|
| public @NotNull Condition | |
| public @NotNull Condition | Returns: The combined conditionThe EXISTS's subquery select)
Deprecated
as a consequence of
Combine this condition with a NOT EXIST clause using the
Condition being deprecated.
Operator#OR operator.
|
| public @NotNull Condition | |
| public @NotNull Condition | Returns: The combined conditionThe other condition sql)
Deprecated
as a consequence of
Combine this condition with another one using the Condition being deprecated.
Operator#XOR
operator.
|
| public @NotNull Condition | Returns: The combined conditionThe other condition sql)
Deprecated
as a consequence of
Combine this condition with another one using the Condition being deprecated.
Operator#XOR
operator.
|
| public @NotNull Condition | Returns: The combined conditionThe other condition sql, Object... The bindings bindings)
Deprecated
as a consequence of
Combine this condition with another one using the Condition being deprecated.
Operator#XOR
operator.
|
| public @NotNull Condition | Returns: The combined conditionThe SQL clause, containing {numbered placeholders} where query
parts can be injected sql, QueryPart... The parts)QueryPart objects that are rendered at the
{numbered placeholder} locations
Deprecated
as a consequence of
Combine this condition with another one using the Condition being deprecated.
Operator#XOR
operator.
|
| public @NotNull Condition | |
| public @NotNull Condition | Returns: The combined conditionThe EXISTS's subquery select)
Deprecated
as a consequence of
Combine this condition with an EXISTS clause using the
Condition being deprecated.
Operator#XOR operator.
|
| public @NotNull Condition | Returns: The combined conditionThe other condition other)
Deprecated
as a consequence of
Combine this condition with a negated other one using the
Condition being deprecated.
Operator#XOR operator.
|
| public @NotNull Condition | |
| public @NotNull Condition | Returns: The combined conditionThe EXISTS's subquery select)
Deprecated
as a consequence of
Combine this condition with a NOT EXIST clause using the
Condition being deprecated.
Operator#XOR operator.
|
| and | back to summary |
|---|---|
| public @NotNull Condition and(Field<Boolean> other)
Deprecated as a consequence of Combine this condition with another one using the | |
| and | back to summary |
|---|---|
| public @NotNull Condition and(SQL sql)
Deprecated as a consequence of Combine this condition with another one using the Note When inserting plain SQL into jOOQ objects, you must guarantee syntax integrity. You may also create the possibility of malicious SQL injection. Be sure to properly use bind variables and/or escape literals when concatenated into SQL clauses! | |
| and | back to summary |
|---|---|
| public @NotNull Condition and(String sql)
Deprecated as a consequence of Combine this condition with another one using the Note When inserting plain SQL into jOOQ objects, you must guarantee syntax integrity. You may also create the possibility of malicious SQL injection. Be sure to properly use bind variables and/or escape literals when concatenated into SQL clauses! | |
| and | back to summary |
|---|---|
| public @NotNull Condition and(String sql, Object... bindings)
Deprecated as a consequence of Combine this condition with another one using the Note When inserting plain SQL into jOOQ objects, you must guarantee syntax integrity. You may also create the possibility of malicious SQL injection. Be sure to properly use bind variables and/or escape literals when concatenated into SQL clauses!
| |
| and | back to summary |
|---|---|
| public @NotNull Condition and(String sql, QueryPart... parts)
Deprecated as a consequence of Combine this condition with another one using the Note When inserting plain SQL into jOOQ objects, you must guarantee syntax integrity. You may also create the possibility of malicious SQL injection. Be sure to properly use bind variables and/or escape literals when concatenated into SQL clauses!
| |
| and | back to summary |
|---|---|
| public @NotNull Condition and(Condition arg2)
Deprecated as a consequence of The | |
| andExists | back to summary |
|---|---|
| public @NotNull Condition andExists(Select<?> select)
Deprecated as a consequence of Combine this condition with an EXISTS clause using the
| |
| andNot | back to summary |
|---|---|
| public @NotNull Condition andNot(Condition other)
Deprecated as a consequence of Combine this condition with a negated other one using the
| |
| andNot | back to summary |
|---|---|
| public @NotNull Condition andNot(Field<Boolean> other)
Deprecated as a consequence of Combine this condition with a negated other one using the
| |
| andNotExists | back to summary |
|---|---|
| public @NotNull Condition andNotExists(Select<?> select)
Deprecated as a consequence of Combine this condition with a NOT EXIST clause using the
| |
| not | back to summary |
|---|---|
| public @NotNull Condition not()
Deprecated as a consequence of The | |
| or | back to summary |
|---|---|
| public @NotNull Condition or(Field<Boolean> other)
Deprecated as a consequence of Combine this condition with another one using the | |
| or | back to summary |
|---|---|
| public @NotNull Condition or(SQL sql)
Deprecated as a consequence of Combine this condition with another one using the Note When inserting plain SQL into jOOQ objects, you must guarantee syntax integrity. You may also create the possibility of malicious SQL injection. Be sure to properly use bind variables and/or escape literals when concatenated into SQL clauses! | |
| or | back to summary |
|---|---|
| public @NotNull Condition or(String sql)
Deprecated as a consequence of Combine this condition with another one using the Note When inserting plain SQL into jOOQ objects, you must guarantee syntax integrity. You may also create the possibility of malicious SQL injection. Be sure to properly use bind variables and/or escape literals when concatenated into SQL clauses! | |
| or | back to summary |
|---|---|
| public @NotNull Condition or(String sql, Object... bindings)
Deprecated as a consequence of Combine this condition with another one using the Note When inserting plain SQL into jOOQ objects, you must guarantee syntax integrity. You may also create the possibility of malicious SQL injection. Be sure to properly use bind variables and/or escape literals when concatenated into SQL clauses!
| |
| or | back to summary |
|---|---|
| public @NotNull Condition or(String sql, QueryPart... parts)
Deprecated as a consequence of Combine this condition with another one using the Note When inserting plain SQL into jOOQ objects, you must guarantee syntax integrity. You may also create the possibility of malicious SQL injection. Be sure to properly use bind variables and/or escape literals when concatenated into SQL clauses!
| |
| or | back to summary |
|---|---|
| public @NotNull Condition or(Condition arg2)
Deprecated as a consequence of The | |
| orExists | back to summary |
|---|---|
| public @NotNull Condition orExists(Select<?> select)
Deprecated as a consequence of Combine this condition with an EXISTS clause using the
| |
| orNot | back to summary |
|---|---|
| public @NotNull Condition orNot(Condition other)
Deprecated as a consequence of Combine this condition with a negated other one using the
| |
| orNot | back to summary |
|---|---|
| public @NotNull Condition orNot(Field<Boolean> other)
Deprecated as a consequence of Combine this condition with a negated other one using the
| |
| orNotExists | back to summary |
|---|---|
| public @NotNull Condition orNotExists(Select<?> select)
Deprecated as a consequence of Combine this condition with a NOT EXIST clause using the
| |
| xor | back to summary |
|---|---|
| public @NotNull Condition xor(Field<Boolean> other)
Deprecated as a consequence of Combine this condition with another one using the | |
| xor | back to summary |
|---|---|
| public @NotNull Condition xor(SQL sql)
Deprecated as a consequence of Combine this condition with another one using the Note When inserting plain SQL into jOOQ objects, you must guarantee syntax integrity. You may also create the possibility of malicious SQL injection. Be sure to properly use bind variables and/or escape literals when concatenated into SQL clauses! | |
| xor | back to summary |
|---|---|
| public @NotNull Condition xor(String sql)
Deprecated as a consequence of Combine this condition with another one using the Note When inserting plain SQL into jOOQ objects, you must guarantee syntax integrity. You may also create the possibility of malicious SQL injection. Be sure to properly use bind variables and/or escape literals when concatenated into SQL clauses! | |
| xor | back to summary |
|---|---|
| public @NotNull Condition xor(String sql, Object... bindings)
Deprecated as a consequence of Combine this condition with another one using the Note When inserting plain SQL into jOOQ objects, you must guarantee syntax integrity. You may also create the possibility of malicious SQL injection. Be sure to properly use bind variables and/or escape literals when concatenated into SQL clauses!
| |
| xor | back to summary |
|---|---|
| public @NotNull Condition xor(String sql, QueryPart... parts)
Deprecated as a consequence of Combine this condition with another one using the Note When inserting plain SQL into jOOQ objects, you must guarantee syntax integrity. You may also create the possibility of malicious SQL injection. Be sure to properly use bind variables and/or escape literals when concatenated into SQL clauses!
| |
| xor | back to summary |
|---|---|
| public @NotNull Condition xor(Condition arg2)
Deprecated as a consequence of The | |
| xorExists | back to summary |
|---|---|
| public @NotNull Condition xorExists(Select<?> select)
Deprecated as a consequence of Combine this condition with an EXISTS clause using the
| |
| xorNot | back to summary |
|---|---|
| public @NotNull Condition xorNot(Condition other)
Deprecated as a consequence of Combine this condition with a negated other one using the
| |
| xorNot | back to summary |
|---|---|
| public @NotNull Condition xorNot(Field<Boolean> other)
Deprecated as a consequence of Combine this condition with a negated other one using the
| |
| xorNotExists | back to summary |
|---|---|
| public @NotNull Condition xorNotExists(Select<?> select)
Deprecated as a consequence of Combine this condition with a NOT EXIST clause using the
| |