- All Superinterfaces:
Field<Boolean>
,FieldOrConstraint
,FieldOrRow
,FieldOrRowOrSelect
,GroupField
,Named
,OrderField<Boolean>
,QueryPart
,SelectField<Boolean>
,SelectFieldOrAsterisk
,Serializable
,TableElement
,Typed<Boolean>
- All Known Subinterfaces:
False
,JSONExistsOnStep
,LikeEscapeStep
,Null
,QOM.And
,QOM.CombinedCondition
,QOM.CompareCondition<T>
,QOM.Contains<T>
,QOM.ContainsIgnoreCase<T>
,QOM.Deleting
,QOM.EndsWith<T>
,QOM.EndsWithIgnoreCase<T>
,QOM.Eq<T>
,QOM.Exists
,QOM.FieldCondition
,QOM.Ge<T>
,QOM.Gt<T>
,QOM.In<T>
,QOM.InList<T>
,QOM.Inserting
,QOM.IsDistinctFrom<T>
,QOM.IsDocument
,QOM.IsJson
,QOM.IsNotDistinctFrom<T>
,QOM.IsNotDocument
,QOM.IsNotJson
,QOM.IsNotNull
,QOM.IsNull
,QOM.Le<T>
,QOM.Like
,QOM.LikeIgnoreCase
,QOM.Lt<T>
,QOM.Ne<T>
,QOM.Not
,QOM.NotIn<T>
,QOM.NotInList<T>
,QOM.NotLike
,QOM.NotLikeIgnoreCase
,QOM.NotSimilarTo
,QOM.Or
,QOM.RegexpLike
,QOM.RowIsNotNull
,QOM.RowIsNull
,QOM.RowOverlaps
,QOM.SelectIsNotNull
,QOM.SelectIsNull
,QOM.SimilarTo
,QOM.StartsWith<T>
,QOM.StartsWithIgnoreCase<T>
,QOM.StContains<T>
,QOM.StCrosses
,QOM.StDisjoint<T>
,QOM.StEquals<T>
,QOM.StIntersects<T>
,QOM.StIsClosed
,QOM.StIsEmpty
,QOM.StOverlaps<T>
,QOM.StTouches<T>
,QOM.StWithin<T>
,QOM.TableEq<R>
,QOM.TableNe<R>
,QOM.Unique
,QOM.Updating
,QOM.XMLExists
,True
- All Known Implementing Classes:
CustomCondition
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. viaSelectWhereStep.where(Condition)
SELECT … HAVING
, e.g. viaSelectHavingStep.having(Condition)
- In a
CASE
expression, e.g. viaDSL.case_()
andCase.when(Condition, Field)
- As an ordinary column expression, e.g. via
DSL.field(Condition)
- In filtered aggregate functions, e.g. via
AggregateFilterStep.filterWhere(Condition)
- ... and many more
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)
.
- Author:
- Lukas Eder
-
Method Summary
Modifier and TypeMethodDescription@NotNull Condition
Combine this condition with another one using theOperator.AND
operator.@NotNull Condition
Combine this condition with another one using theOperator.AND
operator.@NotNull Condition
Combine this condition with another one using theOperator.AND
operator.@NotNull Condition
TheAND
operator.@NotNull Condition
Combine this condition with another one using theOperator.AND
operator.@NotNull Condition
Combine this condition with another one using theOperator.AND
operator.@NotNull Condition
Combine this condition with an EXISTS clause using theOperator.AND
operator.@NotNull Condition
Combine this condition with a negated other one using theOperator.AND
operator.@NotNull Condition
Combine this condition with a negated other one using theOperator.AND
operator.@NotNull Condition
andNotExists
(Select<?> select) Combine this condition with a NOT EXIST clause using theOperator.AND
operator.@NotNull Condition
not()
TheNOT
operator.@NotNull Condition
Combine this condition with another one using theOperator.OR
operator.@NotNull Condition
Combine this condition with another one using theOperator.OR
operator.@NotNull Condition
Combine this condition with another one using theOperator.OR
operator.@NotNull Condition
TheOR
operator.@NotNull Condition
Combine this condition with another one using theOperator.OR
operator.@NotNull Condition
Combine this condition with another one using theOperator.OR
operator.@NotNull Condition
Combine this condition with an EXISTS clause using theOperator.OR
operator.@NotNull Condition
Combine this condition with a negated other one using theOperator.OR
operator.@NotNull Condition
Combine this condition with a negated other one using theOperator.OR
operator.@NotNull Condition
orNotExists
(Select<?> select) Combine this condition with a NOT EXIST clause using theOperator.OR
operator.Methods inherited from interface org.jooq.Field
abs, acos, add, add, as, as, as, as, asc, ascii, asin, atan, atan2, atan2, avg, avgOver, between, between, between, between, betweenSymmetric, betweenSymmetric, betweenSymmetric, betweenSymmetric, bitAnd, bitAnd, bitLength, bitNand, bitNand, bitNor, bitNor, bitNot, bitOr, bitOr, bitXNor, bitXNor, bitXor, bitXor, cast, cast, cast, ceil, changed, charLength, coalesce, coalesce, coerce, coerce, coerce, collate, collate, collate, compare, compare, compare, compare, concat, concat, concat, contains, contains, containsIgnoreCase, containsIgnoreCase, convert, convert, convert, convertFrom, convertFrom, convertTo, convertTo, cos, cosh, cot, coth, count, countDistinct, countOver, decode, decode, decode, decode, deg, desc, div, div, divide, divide, endsWith, endsWith, endsWithIgnoreCase, endsWithIgnoreCase, eq, eq, eq, eq, equal, equal, equal, equal, equalIgnoreCase, equalIgnoreCase, equals, exp, extract, field, firstValue, floor, from, ge, ge, ge, ge, get, getComment, getName, getValue, greaterOrEqual, greaterOrEqual, greaterOrEqual, greaterOrEqual, greaterThan, greaterThan, greaterThan, greaterThan, greatest, greatest, gt, gt, gt, gt, in, in, in, in, in, isDistinctFrom, isDistinctFrom, isDistinctFrom, isDocument, isFalse, isJson, isNotDistinctFrom, isNotDistinctFrom, isNotDistinctFrom, isNotDocument, isNotJson, isNotNull, isNull, isTrue, lag, lag, lag, lag, lastValue, le, le, le, le, lead, lead, lead, lead, least, least, length, lessOrEqual, lessOrEqual, lessOrEqual, lessOrEqual, lessThan, lessThan, lessThan, lessThan, like, like, like, like, like, likeIgnoreCase, likeIgnoreCase, likeIgnoreCase, likeIgnoreCase, likeRegex, likeRegex, ln, log, lower, lpad, lpad, lpad, lpad, lt, lt, lt, lt, ltrim, max, maxOver, median, min, minOver, minus, minus, mod, mod, modulo, modulo, mul, mul, multiply, multiply, ne, ne, ne, ne, neg, notBetween, notBetween, notBetween, notBetween, notBetweenSymmetric, notBetweenSymmetric, notBetweenSymmetric, notBetweenSymmetric, notContains, notContains, notContainsIgnoreCase, notContainsIgnoreCase, notEqual, notEqual, notEqual, notEqual, notEqualIgnoreCase, notEqualIgnoreCase, notIn, notIn, notIn, notIn, notIn, notLike, notLike, notLike, notLike, notLike, notLikeIgnoreCase, notLikeIgnoreCase, notLikeIgnoreCase, notLikeIgnoreCase, notLikeRegex, notLikeRegex, notSimilarTo, notSimilarTo, notSimilarTo, notSimilarTo, nullif, nullif, nvl, nvl, nvl2, nvl2, octetLength, original, plus, plus, plus, position, position, pow, pow, power, power, rad, rem, rem, repeat, repeat, replace, replace, replace, replace, reset, round, round, rpad, rpad, rpad, rpad, rtrim, shl, shl, shr, shr, sign, similarTo, similarTo, similarTo, similarTo, sin, sinh, sort, sort, sortAsc, sortAsc, sortDefault, sortDesc, sortDesc, sqrt, startsWith, startsWith, startsWithIgnoreCase, startsWithIgnoreCase, stddevPop, stddevPopOver, stddevSamp, stddevSampOver, sub, sub, substring, substring, substring, substring, subtract, subtract, sum, sumOver, tan, tanh, times, times, trim, unaryMinus, unaryPlus, upper, varPop, varPopOver, varSamp, varSampOver
Methods inherited from interface org.jooq.Named
$name, getCommentPart, getQualifiedName, getUnqualifiedName
Methods inherited from interface org.jooq.QueryPart
$replace, $replace, $traverse, $traverse, hashCode, toString
Methods inherited from interface org.jooq.Typed
$dataType, getBinding, getConverter, getDataType, getDataType, getType
-
Method Details
-
and
Combine this condition with another one using theOperator.AND
operator.- Parameters:
other
- The other condition- Returns:
- The combined condition
-
and
Combine this condition with another one using theOperator.AND
operator.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!
- Parameters:
sql
- The other condition- Returns:
- The combined condition
- See Also:
-
and
Combine this condition with another one using theOperator.AND
operator.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!
- Parameters:
sql
- The other condition- Returns:
- The combined condition
- See Also:
-
and
Combine this condition with another one using theOperator.AND
operator.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!
- Parameters:
sql
- The other conditionbindings
- The bindings- Returns:
- The combined condition
- See Also:
-
and
Combine this condition with another one using theOperator.AND
operator.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!
- Parameters:
sql
- The SQL clause, containing {numbered placeholders} where query parts can be injectedparts
- TheQueryPart
objects that are rendered at the {numbered placeholder} locations- Returns:
- The combined condition
- See Also:
-
andNot
Combine this condition with a negated other one using theOperator.AND
operator.- Parameters:
other
- The other condition- Returns:
- The combined condition
-
andNot
Combine this condition with a negated other one using theOperator.AND
operator.- Parameters:
other
- The other condition- Returns:
- The combined condition
-
andExists
Combine this condition with an EXISTS clause using theOperator.AND
operator.- Parameters:
select
- The EXISTS's subquery- Returns:
- The combined condition
-
andNotExists
Combine this condition with a NOT EXIST clause using theOperator.AND
operator.- Parameters:
select
- The EXISTS's subquery- Returns:
- The combined condition
-
or
Combine this condition with another one using theOperator.OR
operator.- Parameters:
other
- The other condition- Returns:
- The combined condition
-
or
Combine this condition with another one using theOperator.OR
operator.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!
- Parameters:
sql
- The other condition- Returns:
- The combined condition
- See Also:
-
or
Combine this condition with another one using theOperator.OR
operator.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!
- Parameters:
sql
- The other condition- Returns:
- The combined condition
- See Also:
-
or
Combine this condition with another one using theOperator.OR
operator.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!
- Parameters:
sql
- The other conditionbindings
- The bindings- Returns:
- The combined condition
- See Also:
-
or
Combine this condition with another one using theOperator.OR
operator.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!
- Parameters:
sql
- The SQL clause, containing {numbered placeholders} where query parts can be injectedparts
- TheQueryPart
objects that are rendered at the {numbered placeholder} locations- Returns:
- The combined condition
- See Also:
-
orNot
Combine this condition with a negated other one using theOperator.OR
operator.- Parameters:
other
- The other condition- Returns:
- The combined condition
-
orNot
Combine this condition with a negated other one using theOperator.OR
operator.- Parameters:
other
- The other condition- Returns:
- The combined condition
-
orExists
Combine this condition with an EXISTS clause using theOperator.OR
operator.- Parameters:
select
- The EXISTS's subquery- Returns:
- The combined condition
-
orNotExists
Combine this condition with a NOT EXIST clause using theOperator.OR
operator.- Parameters:
select
- The EXISTS's subquery- Returns:
- The combined condition
-
and
TheAND
operator. -
not
TheNOT
operator. -
or
TheOR
operator.
-