Row value expressions are mainly useful for use in predicates, when comparing several values in one go, which can be more elegant than expanding the row value expression predicate in other equivalent syntaxes. This is especially true for non-equality predicates. For instance, the following two predicates are equivalent in SQL:
(A, B) > (X, Y)
(A > X) OR (A = X AND B > Y)
Example:
// Assuming import static org.jooq.impl.DSL.*;
using(configuration)
.select()
.from(CUSTOMER)
.where(row(CUSTOMER.FIRST_NAME, CUSTOMER.LAST_NAME).in(
select(ACTOR.FIRST_NAME, ACTOR.LAST_NAME).from(ACTOR)
))
.fetch();
Note
Not all databases support row value expressions, but many row value expression operations can be emulated on all databases. See relevant row value expression method Javadocs for details.
Instances can be created using DSL#row(Object. and overloads.
| Modifier and Type | Method and Description |
|---|---|
| public @NotNull BetweenAndStepN | |
| public @NotNull BetweenAndStepN | |
| public @NotNull BetweenAndStepN | |
| public @NotNull BetweenAndStepN | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull BetweenAndStepN | betweenSymmetric(Object... minValues)
Check if this row value expression is within a symmetric range of two other row value expressions. |
| public @NotNull BetweenAndStepN | betweenSymmetric(Field<?>... minValues)
Deprecated
as a consequence of
Check if this row value expression is within a symmetric range of two
other row value expressions.
Field being deprecated.
|
| public @NotNull BetweenAndStepN | betweenSymmetric(RowN minValue)
Check if this row value expression is within a symmetric range of two other row value expressions. |
| public @NotNull BetweenAndStepN | betweenSymmetric(Record minValue)
Check if this row value expression is within a symmetric range of two records. |
| public @NotNull Condition | betweenSymmetric(RowN minValue, RowN maxValue)
Deprecated
as a consequence of
Check if this row value expression is within a symmetric range of two
other row value expressions.
Condition being deprecated.
|
| public @NotNull Condition | betweenSymmetric(Record minValue, Record maxValue)
Deprecated
as a consequence of
Check if this row value expression is within a symmetric range of two
records.
Condition being deprecated.
|
| public @NotNull Condition | compare(Comparator comparator, RowN row)
Deprecated
as a consequence of
Compare this row value expression with another row value expression
using a dynamic comparator.
Condition being deprecated.
|
| public @NotNull Condition | compare(Comparator comparator, Record record)
Deprecated
as a consequence of
Compare this row value expression with a record
using a dynamic comparator.
Condition being deprecated.
|
| public @NotNull Condition | compare(Comparator comparator, Object... values)
Deprecated
as a consequence of
Compare this row value expression with another row value expression
using a dynamic comparator.
Condition being deprecated.
|
| public @NotNull Condition | compare(Comparator comparator, Field<?>... values)
Compare this row value expression with another row value expression
using a dynamic comparator.
|
| public @NotNull Condition | compare(Comparator comparator, Select<? extends Record> select)
Deprecated
as a consequence of
Compare this row value expression with a subselect
using a dynamic comparator.
Condition being deprecated.
|
| public @NotNull Condition | compare(Comparator comparator, QuantifiedSelect<? extends Record> select)
Deprecated
as a consequence of
Compare this row value expression with a subselect
using a dynamic comparator.
Condition being deprecated.
|
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | eq(QuantifiedSelect<? extends Record> select)
Deprecated
as a consequence of
Compare this row value expression with a subselect for equality.
Condition being deprecated.
|
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | equal(QuantifiedSelect<? extends Record> select)
Deprecated
as a consequence of
Compare this row value expression with a subselect for equality.
Condition being deprecated.
|
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | ge(QuantifiedSelect<? extends Record> select)
Deprecated
as a consequence of
Compare this row value expression with a subselect for order.
Condition being deprecated.
|
| public @NotNull Condition | greaterOrEqual(RowN row)
Deprecated
as a consequence of
Compare this row value expression with another row value expression for
order.
Condition being deprecated.
|
| public @NotNull Condition | greaterOrEqual(Record record)
Deprecated
as a consequence of
Compare this row value expression with a record for order.
Condition being deprecated.
|
| public @NotNull Condition | greaterOrEqual(Object... values)
Deprecated
as a consequence of
Compare this row value expression with another row value expression for
order.
Condition being deprecated.
|
| public @NotNull Condition | greaterOrEqual(Field<?>... values)
Compare this row value expression with another row value expression for
order.
|
| public @NotNull Condition | greaterOrEqual(Select<? extends Record> select)
Deprecated
as a consequence of
Compare this row value expression with a subselect for order.
Condition being deprecated.
|
| public @NotNull Condition | greaterOrEqual(QuantifiedSelect<? extends Record> select)
Deprecated
as a consequence of
Compare this row value expression with a subselect for order.
Condition being deprecated.
|
| public @NotNull Condition | greaterThan(RowN row)
Deprecated
as a consequence of
Compare this row value expression with another row value expression for
order.
Condition being deprecated.
|
| public @NotNull Condition | greaterThan(Record record)
Deprecated
as a consequence of
Compare this row value expression with a record for order.
Condition being deprecated.
|
| public @NotNull Condition | greaterThan(Object... values)
Deprecated
as a consequence of
Compare this row value expression with another row value expression for
order.
Condition being deprecated.
|
| public @NotNull Condition | greaterThan(Field<?>... values)
Compare this row value expression with another row value expression for
order.
|
| public @NotNull Condition | greaterThan(Select<? extends Record> select)
Deprecated
as a consequence of
Compare this row value expression with a subselect for order.
Condition being deprecated.
|
| public @NotNull Condition | greaterThan(QuantifiedSelect<? extends Record> select)
Deprecated
as a consequence of
Compare this row value expression with a subselect for order.
Condition being deprecated.
|
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | gt(QuantifiedSelect<? extends Record> select)
Deprecated
as a consequence of
Compare this row value expression with a subselect for order.
Condition being deprecated.
|
| public @NotNull Condition | in(Collection<? extends RowN> rows)
Deprecated
as a consequence of
Compare this row value expression with a set of row value expressions for
equality.
Condition being deprecated.
|
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | isDistinctFrom(RowN row)
Deprecated
as a consequence of
Compare this row value expression with another row value expression for
distinctness.
Condition being deprecated.
|
| public @NotNull Condition | isDistinctFrom(Record record)
Deprecated
as a consequence of
Compare this row value expression with another row value expression for
distinctness.
Condition being deprecated.
|
| public @NotNull Condition | isDistinctFrom(Object... values)
Deprecated
as a consequence of
Compare this row value expression with another row value expression for
distinctness.
Condition being deprecated.
|
| public @NotNull Condition | isDistinctFrom(Field<?>... values)
Compare this row value expression with another row value expression for
distinctness.
|
| public @NotNull Condition | isDistinctFrom(Select<? extends Record> select)
Deprecated
as a consequence of
Compare this row value expression with another row value expression for
distinctness.
Condition being deprecated.
|
| public @NotNull Condition | isNotDistinctFrom(RowN row)
Deprecated
as a consequence of
Compare this row value expression with another row value expression for
distinctness.
Condition being deprecated.
|
| public @NotNull Condition | isNotDistinctFrom(Record record)
Deprecated
as a consequence of
Compare this row value expression with another row value expression for
distinctness.
Condition being deprecated.
|
| public @NotNull Condition | isNotDistinctFrom(Object... values)
Deprecated
as a consequence of
Compare this row value expression with another row value expression for
distinctness.
Condition being deprecated.
|
| public @NotNull Condition | isNotDistinctFrom(Field<?>... values)
Compare this row value expression with another row value expression for
distinctness.
|
| public @NotNull Condition | isNotDistinctFrom(Select<? extends Record> select)
Deprecated
as a consequence of
Compare this row value expression with another row value expression for
distinctness.
Condition being deprecated.
|
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | le(QuantifiedSelect<? extends Record> select)
Deprecated
as a consequence of
Compare this row value expression with a subselect for order.
Condition being deprecated.
|
| public @NotNull Condition | lessOrEqual(RowN row)
Deprecated
as a consequence of
Compare this row value expression with another row value expression for
order.
Condition being deprecated.
|
| public @NotNull Condition | lessOrEqual(Record record)
Deprecated
as a consequence of
Compare this row value expression with a record for order.
Condition being deprecated.
|
| public @NotNull Condition | lessOrEqual(Object... values)
Deprecated
as a consequence of
Compare this row value expression with another row value expression for
order.
Condition being deprecated.
|
| public @NotNull Condition | lessOrEqual(Field<?>... values)
Compare this row value expression with another row value expression for
order.
|
| public @NotNull Condition | lessOrEqual(Select<? extends Record> select)
Deprecated
as a consequence of
Compare this row value expression with a subselect for order.
Condition being deprecated.
|
| public @NotNull Condition | lessOrEqual(QuantifiedSelect<? extends Record> select)
Deprecated
as a consequence of
Compare this row value expression with a subselect for order.
Condition being deprecated.
|
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | lessThan(QuantifiedSelect<? extends Record> select)
Deprecated
as a consequence of
Compare this row value expression with a subselect for order.
Condition being deprecated.
|
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | lt(QuantifiedSelect<? extends Record> select)
Deprecated
as a consequence of
Compare this row value expression with a subselect for order.
Condition being deprecated.
|
| public <U> @NotNull SelectField | |
| public <U> @NotNull SelectField | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | ne(QuantifiedSelect<? extends Record> select)
Deprecated
as a consequence of
Compare this row value expression with a subselect for non-equality.
Condition being deprecated.
|
| public @NotNull BetweenAndStepN | notBetween(Object... minValues)
Check if this row value expression is not within a range of two other row value expressions. |
| public @NotNull BetweenAndStepN | notBetween(Field<?>... minValues)
Deprecated
as a consequence of
Check if this row value expression is not within a range of two other
row value expressions.
Field being deprecated.
|
| public @NotNull BetweenAndStepN | notBetween(RowN minValue)
Check if this row value expression is not within a range of two other row value expressions. |
| public @NotNull BetweenAndStepN | |
| public @NotNull Condition | notBetween(RowN minValue, RowN maxValue)
Deprecated
as a consequence of
Check if this row value expression is not within a range of two other
row value expressions.
Condition being deprecated.
|
| public @NotNull Condition | notBetween(Record minValue, Record maxValue)
Deprecated
as a consequence of
Check if this row value expression is within a range of two records.
Condition being deprecated.
|
| public @NotNull BetweenAndStepN | notBetweenSymmetric(Object... minValues)
Check if this row value expression is not within a symmetric range of two other row value expressions. |
| public @NotNull BetweenAndStepN | notBetweenSymmetric(Field<?>... minValues)
Deprecated
as a consequence of
Check if this row value expression is not within a symmetric range of two
other row value expressions.
Field being deprecated.
|
| public @NotNull BetweenAndStepN | notBetweenSymmetric(RowN minValue)
Check if this row value expression is not within a symmetric range of two other row value expressions. |
| public @NotNull BetweenAndStepN | notBetweenSymmetric(Record minValue)
Check if this row value expression is not within a symmetric range of two records. |
| public @NotNull Condition | notBetweenSymmetric(RowN minValue, RowN maxValue)
Deprecated
as a consequence of
Check if this row value expression is not within a symmetric range of two
other row value expressions.
Condition being deprecated.
|
| public @NotNull Condition | notBetweenSymmetric(Record minValue, Record maxValue)
Deprecated
as a consequence of
Check if this row value expression is not within a symmetric range of two
records.
Condition being deprecated.
|
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | notEqual(QuantifiedSelect<? extends Record> select)
Deprecated
as a consequence of
Compare this row value expression with a subselect for non-equality.
Condition being deprecated.
|
| public @NotNull Condition | notIn(Collection<? extends RowN> rows)
Deprecated
as a consequence of
Compare this row value expression with a set of row value expressions for
equality.
Condition being deprecated.
|
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Condition |