public class NullIf<T>
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
Field<T> |
abs()
Deprecated.
|
void |
accept(Context<?> ctx)
|
Field<java.math.BigDecimal> |
acos()
Deprecated.
|
Field<T> |
add(Field<?> value)
An arithmetic expression to add value to this.
|
Field<T> |
add(java.lang.Number value)
An arithmetic expression adding this to value.
|
Field<T> |
as(Field<?> otherField)
Create an alias for this field based on another field's name.
|
Field<T> |
as(java.util.function.Function<? super Field<T>,? extends java.lang.String> aliasFunction)
Create an alias for this field.
|
Field<T> |
as(Name alias)
Create an alias for this field.
|
Field<T> |
as(java.lang.String alias)
Create an alias for this field.
|
SortField<T> |
asc()
Create an ascending sort field from this field.
|
Field<java.lang.Integer> |
ascii()
Deprecated.
|
Field<java.math.BigDecimal> |
asin()
Deprecated.
|
Field<java.math.BigDecimal> |
atan()
Deprecated.
|
Field<java.math.BigDecimal> |
atan2(Field<? extends java.lang.Number> y)
Deprecated.
|
Field<java.math.BigDecimal> |
atan2(java.lang.Number y)
Deprecated.
|
Field<java.math.BigDecimal> |
avg()
Deprecated.
|
WindowPartitionByStep<java.math.BigDecimal> |
avgOver()
Deprecated.
|
BetweenAndStep<T> |
between(Field<T> minValue)
Create a condition to check this field against some bounds.
|
Condition |
between(Field<T> minValue,
Field<T> maxValue)
Create a condition to check this field against some bounds.
|
BetweenAndStep<T> |
between(T minValue)
Create a condition to check this field against some bounds.
|
Condition |
between(T minValue,
T maxValue)
Create a condition to check this field against some bounds.
|
BetweenAndStep<T> |
betweenSymmetric(Field<T> minValue)
Create a condition to check this field against some bounds.
|
Condition |
betweenSymmetric(Field<T> minValue,
Field<T> maxValue)
Create a condition to check this field against some bounds.
|
BetweenAndStep<T> |
betweenSymmetric(T minValue)
Create a condition to check this field against some bounds.
|
Condition |
betweenSymmetric(T minValue,
T maxValue)
Create a condition to check this field against some bounds.
|
void |
bind(BindContext context)
Deprecated.
- 3.4.0 - [#2694] - Use
QueryPartInternal.accept(Context) instead. |
Field<T> |
bitAnd(Field<T> value)
The bitwise and operator.
|
Field<T> |
bitAnd(T value)
The bitwise and operator.
|
Field<java.lang.Integer> |
bitLength()
Deprecated.
|
Field<T> |
bitNand(Field<T> value)
The bitwise not and operator.
|
Field<T> |
bitNand(T value)
The bitwise not and operator.
|
Field<T> |
bitNor(Field<T> value)
The bitwise not or operator.
|
Field<T> |
bitNor(T value)
The bitwise not or operator.
|
Field<T> |
bitNot()
The bitwise not operator.
|
Field<T> |
bitOr(Field<T> value)
The bitwise or operator.
|
Field<T> |
bitOr(T value)
The bitwise or operator.
|
Field<T> |
bitXNor(Field<T> value)
The bitwise not xor operator.
|
Field<T> |
bitXNor(T value)
The bitwise not xor operator.
|
Field<T> |
bitXor(Field<T> value)
The bitwise xor operator.
|
Field<T> |
bitXor(T value)
The bitwise xor operator.
|
<Z> Field<Z> |
cast(java.lang.Class<Z> type)
Cast this field to another type.
|
<Z> Field<Z> |
cast(DataType<Z> type)
Cast this field to a dialect-specific data type.
|
<Z> Field<Z> |
cast(Field<Z> field)
Cast this field to the type of another field.
|
Field<T> |
ceil()
Deprecated.
|
boolean |
changed(Record record)
The inverse operation of
Record.changed(Field) . |
Field<java.lang.Integer> |
charLength()
Deprecated.
|
Clause[] |
clauses(Context<?> ctx)
The
Clause s that are represented by this query part. |
Field<T> |
coalesce(Field<T> option,
Field<?>... options)
Deprecated.
|
Field<T> |
coalesce(T option,
T... options)
Deprecated.
|
<Z> Field<Z> |
coerce(java.lang.Class<Z> type)
Coerce this field to another type.
|
<Z> Field<Z> |
coerce(DataType<Z> type)
Coerce this field to a dialect-specific data type.
|
<Z> Field<Z> |
coerce(Field<Z> field)
Coerce this field to the type of another field.
|
Condition |
compare(Comparator comparator,
Field<T> field)
Compare this field with another field using a dynamic comparator.
|
Condition |
compare(Comparator comparator,
QuantifiedSelect<? extends Record1<T>> query)
Compare this field with a quantified subselect using a dynamic
comparator.
|
Condition |
compare(Comparator comparator,
Select<? extends Record1<T>> query)
Compare this field with a subselect using a dynamic comparator.
|
Condition |
compare(Comparator comparator,
T value)
Compare this field with a value using a dynamic comparator.
|
Field<java.lang.String> |
concat(Field<?>... fields)
Deprecated.
|
Field<java.lang.String> |
concat(java.lang.String... values)
Deprecated.
|
Condition |
contains(Field<T> value)
Convenience method for
Field.like(String, char) including proper
adding of wildcards and escaping. |
Condition |
contains(T value)
Convenience method for
Field.like(String, char) including proper
adding of wildcards and escaping. |
Condition |
containsIgnoreCase(Field<T> value)
Convenience method for
Field.likeIgnoreCase(String, char) including
proper adding of wildcards and escaping. |
Condition |
containsIgnoreCase(T value)
Convenience method for
Field.likeIgnoreCase(String, char) including
proper adding of wildcards and escaping. |
Field<java.math.BigDecimal> |
cos()
Deprecated.
|
Field<java.math.BigDecimal> |
cosh()
Deprecated.
|
Field<java.math.BigDecimal> |
cot()
Deprecated.
|
Field<java.math.BigDecimal> |
coth()
Deprecated.
|
Field<java.lang.Integer> |
count()
Deprecated.
|
Field<java.lang.Integer> |
countDistinct()
Deprecated.
|
WindowPartitionByStep<java.lang.Integer> |
countOver()
Deprecated.
|
protected DSLContext |
create()
Internal convenience method
|
protected DSLContext |
create(Configuration configuration)
Internal convenience method
|
protected DSLContext |
create(Context<?> ctx)
Internal convenience method
|
boolean |
declaresCTE()
Subclasses may override this
|
boolean |
declaresFields()
Subclasses may override this
|
boolean |
declaresTables()
Subclasses may override this
|
boolean |
declaresWindows()
Subclasses may override this
|
<Z> Field<Z> |
decode(Field<T> search,
Field<Z> result)
Deprecated.
|
<Z> Field<Z> |
decode(Field<T> search,
Field<Z> result,
Field<?>... more)
Deprecated.
|
<Z> Field<Z> |
decode(T search,
Z result)
Deprecated.
|
<Z> Field<Z> |
decode(T search,
Z result,
java.lang.Object... more)
Deprecated.
|
Field<java.math.BigDecimal> |
deg()
Deprecated.
|
SortField<T> |
desc()
Create a descending sort field from this field.
|
Field<T> |
div(Field<? extends java.lang.Number> value)
An arithmetic expression dividing this by value.
|
Field<T> |
div(java.lang.Number value)
An arithmetic expression dividing this by value.
|
Field<T> |
divide(Field<? extends java.lang.Number> value)
An alias for
Field.div(Field) . |
Field<T> |
divide(java.lang.Number value)
An alias for
Field.div(Number) . |
Condition |
endsWith(Field<T> value)
Convenience method for
Field.like(String, char) including proper
adding of wildcards and escaping. |
Condition |
endsWith(T value)
Convenience method for
Field.like(String, char) including proper
adding of wildcards and escaping. |
Condition |
eq(Field<T> field)
this = field . |
Condition |
eq(QuantifiedSelect<? extends Record1<T>> query)
this = [quantifier] (Select<? |
Condition |
eq(Select<? extends Record1<T>> query)
this = (Select<? |
Condition |
eq(T value)
this = value . |
Condition |
equal(Field<T> field)
this = field . |
Condition |
equal(QuantifiedSelect<? extends Record1<T>> query)
this = [quantifier] (Select<? |
Condition |
equal(Select<? extends Record1<T>> query)
this = (Select<? |
Condition |
equal(T value)
this = value . |
Condition |
equalIgnoreCase(Field<java.lang.String> value)
lower(this) = lower(value) . |
Condition |
equalIgnoreCase(java.lang.String value)
lower(this) = lower(value) . |
boolean |
equals(java.lang.Object that)
Check whether this
QueryPart can be considered equal to
another QueryPart . |
Field<java.math.BigDecimal> |
exp()
Deprecated.
|
Field<java.lang.Integer> |
extract(DatePart datePart)
Deprecated.
|
Field<T> |
field(Record record)
The inverse operation of
Record.field(Field) . |
WindowIgnoreNullsStep<T> |
firstValue()
Deprecated.
|
Field<T> |
floor()
Deprecated.
|
Record1<T> |
from(Record record)
The inverse operation of
Record.into(Field) . |
Condition |
ge(Field<T> field)
this >= field . |
Condition |
ge(QuantifiedSelect<? extends Record1<T>> query)
this >= [quantifier] (Select<? |
Condition |
ge(Select<? extends Record1<T>> query)
this >= (Select<? |
Condition |
ge(T value)
this >= value . |
boolean |
generatesCast()
Subclasses may override this
|
T |
get(Record record)
The inverse operation of
Record.get(Field) . |
Binding<?,T> |
getBinding()
The field's underlying
Binding . |
java.lang.String |
getComment()
The comment given to the field.
|
Converter<?,T> |
getConverter()
The field's underlying
Converter . |
DataType<T> |
getDataType()
The type of this field (might not be dialect-specific).
|
DataType<T> |
getDataType(Configuration configuration)
The dialect-specific type of this field.
|
java.lang.String |
getName()
The name of the field.
|
Name |
getQualifiedName()
The qualified name of this field.
|
java.lang.Class<T> |
getType()
The Java type of the field.
|
Name |
getUnqualifiedName()
The unqualified name of this field.
|
T |
getValue(Record record)
The inverse operation of
Record.getValue(Field) . |
Condition |
greaterOrEqual(Field<T> field)
this >= field . |
Condition |
greaterOrEqual(QuantifiedSelect<? extends Record1<T>> query)
this >= [quantifier] (Select<? |
Condition |
greaterOrEqual(Select<? extends Record1<T>> query)
this >= (Select<? |
Condition |
greaterOrEqual(T value)
this >= value . |
Condition |
greaterThan(Field<T> field)
this > field . |
Condition |
greaterThan(QuantifiedSelect<? extends Record1<T>> query)
this > [quantifier] (Select<? |
Condition |
greaterThan(Select<? extends Record1<T>> query)
this > (Select<? |
Condition |
greaterThan(T value)
this > value . |
Field<T> |
greatest(Field<?>... others)
Deprecated.
|
Field<T> |
greatest(T... others)
Deprecated.
|
Condition |
gt(Field<T> field)
this > field . |
Condition |
gt(QuantifiedSelect<? extends Record1<T>> query)
this > [quantifier] (Select<? |
Condition |
gt(Select<? extends Record1<T>> query)
this > (Select<? |
Condition |
gt(T value)
this > value . |
int |
hashCode()
Generate a hash code from this
QueryPart . |
Condition |
in(java.util.Collection<?> values)
Create a condition to check this field against several values.
|
Condition |
in(Field<?>... values)
Create a condition to check this field against several values.
|
Condition |
in(Result<? extends Record1<T>> result)
Create a condition to check this field against several values from a
previous query.
|
Condition |
in(Select<? extends Record1<T>> query)
Create a condition to check this field against a subquery.
|
Condition |
in(T... values)
Create a condition to check this field against several values.
|
Condition |
isDistinctFrom(Field<T> field)
Create a condition to check if this field is
DISTINCT from
another field. |
Condition |
isDistinctFrom(T value)
Create a condition to check if this field is
DISTINCT from
another value. |
Condition |
isFalse()
Create a condition to check this field against known string literals for
false . |
Condition |
isNotDistinctFrom(Field<T> field)
Create a condition to check if this field is
NOT DISTINCT
from another field. |
Condition |
isNotDistinctFrom(T value)
Create a condition to check if this field is
NOT DISTINCT
from another value. |
Condition |
isNotNull()
Create a condition to check this field against
null . |
Condition |
isNull()
Create a condition to check this field against
null . |
Condition |
isTrue()
Create a condition to check this field against known string literals for
true . |
WindowIgnoreNullsStep<T> |
lag()
Deprecated.
|
WindowIgnoreNullsStep<T> |
lag(int offset)
Deprecated.
|
WindowIgnoreNullsStep<T> |
lag(int offset,
Field<T> defaultValue)
Deprecated.
|
WindowIgnoreNullsStep<T> |
lag(int offset,
T defaultValue)
Deprecated.
|
WindowIgnoreNullsStep<T> |
lastValue()
Deprecated.
|
Condition |
le(Field<T> field)
this <= field . |
Condition |
le(QuantifiedSelect<? extends Record1<T>> query)
this <= [quantifier] (Select<? |
Condition |
le(Select<? extends Record1<T>> query)
this <= (Select<? |
Condition |
le(T value)
this <= value . |
WindowIgnoreNullsStep<T> |
lead()
Deprecated.
|
WindowIgnoreNullsStep<T> |
lead(int offset)
Deprecated.
|
WindowIgnoreNullsStep<T> |
lead(int offset,
Field<T> defaultValue)
Deprecated.
|
WindowIgnoreNullsStep<T> |
lead(int offset,
T defaultValue)
Deprecated.
|
Field<T> |
least(Field<?>... others)
Deprecated.
|
Field<T> |
least(T... others)
Deprecated.
|
Field<java.lang.Integer> |
length()
Deprecated.
|
Condition |
lessOrEqual(Field<T> field)
this <= field . |
Condition |
lessOrEqual(QuantifiedSelect<? extends Record1<T>> query)
this <= [quantifier] (Select<? |
Condition |
lessOrEqual(Select<? extends Record1<T>> query)
this <= (Select<? |
Condition |
lessOrEqual(T value)
this <= value . |
Condition |
lessThan(Field<T> field)
this < field . |
Condition |
lessThan(QuantifiedSelect<? extends Record1<T>> query)
this < [quantifier] (Select<? |
Condition |
lessThan(Select<? extends Record1<T>> query)
this < (Select<? |
Condition |
lessThan(T value)
this < value . |
LikeEscapeStep |
like(Field<java.lang.String> field)
Create a condition to pattern-check this field against a value.
|
Condition |
like(Field<java.lang.String> field,
char escape)
Create a condition to pattern-check this field against a value.
|
LikeEscapeStep |
like(java.lang.String value)
Create a condition to pattern-check this field against a value.
|
Condition |
like(java.lang.String value,
char escape)
Create a condition to pattern-check this field against a value.
|
LikeEscapeStep |
likeIgnoreCase(Field<java.lang.String> field)
Create a condition to case-insensitively pattern-check this field against
a field.
|
Condition |
likeIgnoreCase(Field<java.lang.String> field,
char escape)
Create a condition to case-insensitively pattern-check this field against
a field.
|
LikeEscapeStep |
likeIgnoreCase(java.lang.String value)
Create a condition to case-insensitively pattern-check this field against
a value.
|
Condition |
likeIgnoreCase(java.lang.String value,
char escape)
Create a condition to case-insensitively pattern-check this field against
a value.
|
Condition |
likeRegex(Field<java.lang.String> pattern)
Create a condition to regex-pattern-check this field against a pattern.
|
Condition |
likeRegex(java.lang.String pattern)
Create a condition to regex-pattern-check this field against a pattern.
|
Field<java.math.BigDecimal> |
ln()
Deprecated.
|
Field<java.math.BigDecimal> |
log(int base)
Deprecated.
|
Field<java.lang.String> |
lower()
Deprecated.
|
Field<java.lang.String> |
lpad(Field<? extends java.lang.Number> length)
Deprecated.
|
Field<java.lang.String> |
lpad(Field<? extends java.lang.Number> length,
Field<java.lang.String> character)
Deprecated.
|
Field<java.lang.String> |
lpad(int length)
Deprecated.
|
Field<java.lang.String> |
lpad(int length,
char character)
Deprecated.
|
Condition |
lt(Field<T> field)
this < field . |
Condition |
lt(QuantifiedSelect<? extends Record1<T>> query)
this < [quantifier] (Select<? |
Condition |
lt(Select<? extends Record1<T>> query)
this < (Select<? |
Condition |
lt(T value)
this < value . |
Field<java.lang.String> |
ltrim()
Deprecated.
|
Field<T> |
max()
Deprecated.
|
WindowPartitionByStep<T> |
maxOver()
Deprecated.
|
Field<java.math.BigDecimal> |
median()
Deprecated.
|
Field<T> |
min()
Deprecated.
|
WindowPartitionByStep<T> |
minOver()
Deprecated.
|
Field<T> |
minus(Field<?> value)
An alias for
Field.sub(Field) . |
Field<T> |
minus(java.lang.Number value)
An alias for
Field.sub(Number) . |
Field<T> |
mod(Field<? extends java.lang.Number> value)
An arithmetic expression getting the modulo of this divided by value.
|
Field<T> |
mod(java.lang.Number value)
An arithmetic expression getting the modulo of this divided by value.
|
Field<T> |
modulo(Field<? extends java.lang.Number> value)
An alias for
Field.mod(Field) . |
Field<T> |
modulo(java.lang.Number value)
An alias for
Field.mod(Number) . |
Field<T> |
mul(Field<? extends java.lang.Number> value)
This default implementation is known to be overridden by
Expression to generate neater expressions |
Field<T> |
mul(java.lang.Number value)
An arithmetic expression multiplying this with value.
|
Field<T> |
multiply(Field<? extends java.lang.Number> value)
An alias for
Field.mul(Field) . |
Field<T> |
multiply(java.lang.Number value)
An alias for
Field.mul(Number) . |
Condition |
ne(Field<T> field)
this ! |
Condition |
ne(QuantifiedSelect<? extends Record1<T>> query)
this ! |
Condition |
ne(Select<? extends Record1<T>> query)
this ! |
Condition |
ne(T value)
this ! |
Field<T> |
neg()
Negate this field to get its negative value.
|
BetweenAndStep<T> |
notBetween(Field<T> minValue)
Create a condition to check this field against some bounds.
|
Condition |
notBetween(Field<T> minValue,
Field<T> maxValue)
Create a condition to check this field against some bounds.
|
BetweenAndStep<T> |
notBetween(T minValue)
Create a condition to check this field against some bounds.
|
Condition |
notBetween(T minValue,
T maxValue)
Create a condition to check this field against some bounds.
|
BetweenAndStep<T> |
notBetweenSymmetric(Field<T> minValue)
Create a condition to check this field against some bounds.
|
Condition |
notBetweenSymmetric(Field<T> minValue,
Field<T> maxValue)
Create a condition to check this field against some bounds.
|
BetweenAndStep<T> |
notBetweenSymmetric(T minValue)
Create a condition to check this field against some bounds.
|
Condition |
notBetweenSymmetric(T minValue,
T maxValue)
Create a condition to check this field against some bounds.
|
Condition |
notContains(Field<T> value)
Inverse of
Field.contains(Field) . |
Condition |
notContains(T value)
Inverse of
Field.contains(Object) . |
Condition |
notContainsIgnoreCase(Field<T> value)
Inverse of
Field.containsIgnoreCase(Field) |
Condition |
notContainsIgnoreCase(T value)
Inverse of
Field.containsIgnoreCase(Object) |
Condition |
notEqual(Field<T> field)
this ! |
Condition |
notEqual(QuantifiedSelect<? extends Record1<T>> query)
this ! |
Condition |
notEqual(Select<? extends Record1<T>> query)
this ! |
Condition |
notEqual(T value)
this ! |
Condition |
notEqualIgnoreCase(Field<java.lang.String> value)
lower(this) ! |
Condition |
notEqualIgnoreCase(java.lang.String value)
lower(this) ! |
Condition |
notIn(java.util.Collection<?> values)
Create a condition to check this field against several values.
|
Condition |
notIn(Field<?>... values)
Create a condition to check this field against several values.
|
Condition |
notIn(Result<? extends Record1<T>> result)
Create a condition to check this field against several values from a
previous query.
|
Condition |
notIn(Select<? extends Record1<T>> query)
Create a condition to check this field against a subquery.
|
Condition |
notIn(T... values)
Create a condition to check this field against several values.
|
LikeEscapeStep |
notLike(Field<java.lang.String> field)
Create a condition to pattern-check this field against a field.
|
Condition |
notLike(Field<java.lang.String> field,
char escape)
Create a condition to pattern-check this field against a field.
|
LikeEscapeStep |
notLike(java.lang.String value)
Create a condition to pattern-check this field against a value.
|
Condition |
notLike(java.lang.String value,
char escape)
Create a condition to pattern-check this field against a value.
|
LikeEscapeStep |
notLikeIgnoreCase(Field<java.lang.String> field)
Create a condition to case-insensitively pattern-check this field against
a field.
|
Condition |
notLikeIgnoreCase(Field<java.lang.String> field,
char escape)
Create a condition to case-insensitively pattern-check this field against
a field.
|
LikeEscapeStep |
notLikeIgnoreCase(java.lang.String value)
Create a condition to case-insensitively pattern-check this field against
a value.
|
Condition |
notLikeIgnoreCase(java.lang.String value,
char escape)
Create a condition to case-insensitively pattern-check this field against
a value.
|
Condition |
notLikeRegex(Field<java.lang.String> pattern)
Create a condition to regex-pattern-check this field against a pattern.
|
Condition |
notLikeRegex(java.lang.String pattern)
Create a condition to regex-pattern-check this field against a pattern.
|
Field<T> |
nullif(Field<T> other)
Deprecated.
|
Field<T> |
nullif(T other)
Deprecated.
|
Field<T> |
nvl(Field<T> defaultValue)
Deprecated.
|
Field<T> |
nvl(T defaultValue)
Deprecated.
|
<Z> Field<Z> |
nvl2(Field<Z> valueIfNotNull,
Field<Z> valueIfNull)
Deprecated.
|
<Z> Field<Z> |
nvl2(Z valueIfNotNull,
Z valueIfNull)
Deprecated.
|
Field<java.lang.Integer> |
octetLength()
Deprecated.
|
T |
original(Record record)
The inverse operation of
Record.original(Field) . |
Field<T> |
plus()
Turn this field into an Oracle-specific field for use in outer-join
predicates.
|
Field<T> |
plus(Field<?> value)
An alias for
Field.add(Field) . |
Field<T> |
plus(java.lang.Number value)
An alias for
Field.add(Number) . |
Field<java.lang.Integer> |
position(Field<java.lang.String> search)
Deprecated.
|
Field<java.lang.Integer> |
position(java.lang.String search)
Deprecated.
|
Field<java.math.BigDecimal> |
pow(Field<? extends java.lang.Number> exponent)
An arithmetic expression getting this value raised to the power of
exponent . |
Field<java.math.BigDecimal> |
pow(java.lang.Number exponent)
An arithmetic expression getting this value raised to the power of
exponent . |
Field<java.math.BigDecimal> |
power(Field<? extends java.lang.Number> exponent)
An alias for
Field.power(Field) . |
Field<java.math.BigDecimal> |
power(java.lang.Number exponent)
An alias for
Field.power(Number) . |
Field<java.math.BigDecimal> |
rad()
Deprecated.
|
Field<T> |
rem(Field<? extends java.lang.Number> value)
An alias for
Field.mod(Field) . |
Field<T> |
rem(java.lang.Number value)
An alias for
Field.mod(Number) . |
Field<java.lang.String> |
repeat(Field<? extends java.lang.Number> count)
Deprecated.
|
Field<java.lang.String> |
repeat(java.lang.Number count)
Deprecated.
|
Field<java.lang.String> |
replace(Field<java.lang.String> search)
Deprecated.
|
Field<java.lang.String> |
replace(Field<java.lang.String> search,
Field<java.lang.String> replace)
Deprecated.
|
Field<java.lang.String> |
replace(java.lang.String search)
Deprecated.
|
Field<java.lang.String> |
replace(java.lang.String search,
java.lang.String replace)
Deprecated.
|
void |
reset(Record record)
The inverse operation of
Record.reset(Field) . |
Field<T> |
round()
Deprecated.
|
Field<T> |
round(int decimals)
Deprecated.
|
Field<java.lang.String> |
rpad(Field<? extends java.lang.Number> length)
Deprecated.
|
Field<java.lang.String> |
rpad(Field<? extends java.lang.Number> length,
Field<java.lang.String> character)
Deprecated.
|
Field<java.lang.String> |
rpad(int length)
Deprecated.
|
Field<java.lang.String> |
rpad(int length,
char character)
Deprecated.
|
Field<java.lang.String> |
rtrim()
Deprecated.
|
Field<T> |
shl(Field<? extends java.lang.Number> value)
The bitwise left shift operator.
|
Field<T> |
shl(java.lang.Number value)
The bitwise left shift operator.
|
Field<T> |
shr(Field<? extends java.lang.Number> value)
The bitwise right shift operator.
|
Field<T> |
shr(java.lang.Number value)
The bitwise right shift operator.
|
Field<java.lang.Integer> |
sign()
Deprecated.
|
Field<java.math.BigDecimal> |
sin()
Deprecated.
|
Field<java.math.BigDecimal> |
sinh()
Deprecated.
|
<Z> SortField<Z> |
sort(java.util.Map<T,Z> sortMap)
Create an indirected sort field.
|
SortField<T> |
sort(SortOrder order)
Create an ascending/descending sort field from this field.
|
SortField<java.lang.Integer> |
sortAsc(java.util.Collection<T> sortList)
Create an indirected sort field.
|
SortField<java.lang.Integer> |
sortAsc(T... sortList)
Create an indirected sort field.
|
SortField<T> |
sortDefault()
Create a default sorted (implicit
ASC ) from this field. |
SortField<java.lang.Integer> |
sortDesc(java.util.Collection<T> sortList)
Create an indirected sort field.
|
SortField<java.lang.Integer> |
sortDesc(T... sortList)
Create an indirected sort field.
|
Field<java.math.BigDecimal> |
sqrt()
Deprecated.
|
Condition |
startsWith(Field<T> value)
Convenience method for
Field.like(String, char) including proper
adding of wildcards and escaping. |
Condition |
startsWith(T value)
Convenience method for
Field.like(String, char) including proper
adding of wildcards and escaping. |
Field<java.math.BigDecimal> |
stddevPop()
Deprecated.
|
WindowPartitionByStep<java.math.BigDecimal> |
stddevPopOver()
Deprecated.
|
Field<java.math.BigDecimal> |
stddevSamp()
Deprecated.
|
WindowPartitionByStep<java.math.BigDecimal> |
stddevSampOver()
Deprecated.
|
Field<T> |
sub(Field<?> value)
An arithmetic expression subtracting value from this.
|
Field<T> |
sub(java.lang.Number value)
An arithmetic expression subtracting value from this.
|
Field<java.lang.String> |
substring(Field<? extends java.lang.Number> startingPosition)
Deprecated.
|
Field<java.lang.String> |
substring(Field<? extends java.lang.Number> startingPosition,
Field<? extends java.lang.Number> length)
Deprecated.
|
Field<java.lang.String> |
substring(int startingPosition)
Deprecated.
|
Field<java.lang.String> |
substring(int startingPosition,
int length)
Deprecated.
|
Field<T> |
subtract(Field<?> value)
An alias for
Field.sub(Field) . |
Field<T> |
subtract(java.lang.Number value)
An alias for
Field.sub(Number) . |
Field<java.math.BigDecimal> |
sum()
Deprecated.
|
WindowPartitionByStep<java.math.BigDecimal> |
sumOver()
Deprecated.
|
Field<java.math.BigDecimal> |
tan()
Deprecated.
|
Field<java.math.BigDecimal> |
tanh()
Deprecated.
|
Field<T> |
times(Field<? extends java.lang.Number> value)
An alias for
Field.mul(Field) . |
Field<T> |
times(java.lang.Number value)
An alias for
Field.mul(Number) . |
void |
toSQL(RenderContext context)
Deprecated.
- 3.4.0 - [#2694] - Use
QueryPartInternal.accept(Context) instead. |
java.lang.String |
toString()
Render a SQL string representation of this
QueryPart . |
protected DataAccessException |
translate(java.lang.String sql,
java.sql.SQLException e)
Internal convenience method
|
Field<java.lang.String> |
trim()
Deprecated.
|
Field<T> |
unaryMinus()
Negate this field to get its negative value.
|
Field<T> |
unaryPlus()
Get this field as its positive value (no effect on SQL).
|
Field<java.lang.String> |
upper()
Deprecated.
|
Field<java.math.BigDecimal> |
varPop()
Deprecated.
|
WindowPartitionByStep<java.math.BigDecimal> |
varPopOver()
Deprecated.
|
Field<java.math.BigDecimal> |
varSamp()
Deprecated.
|
WindowPartitionByStep<java.math.BigDecimal> |
varSampOver()
Deprecated.
|
public final void accept(Context<?> ctx)
QueryPartInternal
QueryPart
can accept
a Context
object
in order to render a SQL string or to bind its variables.accept
in interface QueryPartInternal
public Clause[] clauses(Context<?> ctx)
QueryPartInternal
Clause
s that are represented by this query part.
QueryPart
s can specify several Clause
s for which an
event will be emitted before
(in forward
order) and after
(in reverse order) visiting
the the query part through Context.visit(QueryPart)
This method is for JOOQ INTERNAL USE only. Do not reference directly
clauses
in interface QueryPartInternal
Clause
s represented by this query part or
null
or an empty array if this query part does not
represent a clause.public final Field<T> field(Record record)
Field
Record.field(Field)
.
This method can be used in its method reference form conveniently on a generated table, for instance, when mapping records in a stream.
public final T get(Record record)
Field
Record.get(Field)
.
This method can be used in its method reference form conveniently on a
generated table, for instance, when mapping records in a stream:
DSL.using(configuration)
.fetch("select * from t")
.stream()
.map(MY_TABLE.ID::get)
.forEach(System.out::println);
public final T getValue(Record record)
Field
Record.getValue(Field)
.
This method can be used in its method reference form conveniently on a
generated table, for instance, when mapping records in a stream:
DSL.using(configuration)
.fetch("select * from t")
.stream()
.map(MY_TABLE.ID::getValue)
.forEach(System.out::println);
public final T original(Record record)
Field
Record.original(Field)
.
This method can be used in its method reference form conveniently on a
generated table, for instance, when mapping records in a stream:
DSL.using(configuration)
.fetch("select * from t")
.stream()
.map(MY_TABLE.ID::original)
.forEach(System.out::println);
public final boolean changed(Record record)
Field
Record.changed(Field)
.
This method can be used in its method reference form conveniently on a
generated table, for instance, when mapping records in a stream:
DSL.using(configuration)
.fetch("select * from t")
.stream()
.map(MY_TABLE.ID::changed)
.forEach(System.out::println);
public final void reset(Record record)
Field
Record.reset(Field)
.
This method can be used in its method reference form conveniently on a
generated table, for instance, when mapping records in a stream:
DSL.using(configuration)
.fetch("select * from t")
.stream()
.forEach(MY_TABLE.ID::reset);
public final Record1<T> from(Record record)
Field
Record.into(Field)
.
This method can be used in its method reference form conveniently on a
generated table, for instance, when mapping records in a stream:
DSL.using(configuration)
.fetch("select * from t")
.stream()
.map(MY_TABLE.ID::from)
.forEach(System.out::println);
public final Field<T> as(java.lang.String alias)
Field
Note that the case-sensitivity of the returned field depends on
Settings.getRenderNameStyle()
. By default, field aliases are
quoted, and thus case-sensitive!
public Field<T> as(Name alias)
Field
Note that the case-sensitivity of the returned field depends on
Settings.getRenderNameStyle()
and the Name
. By default,
field aliases are quoted, and thus case-sensitive - use
DSL.unquotedName(String...)
for case-insensitive aliases.
If the argument Name.getName()
is qualified, then the
Name.last()
part will be used.
public final Field<T> as(Field<?> otherField)
Field
Note that the case-sensitivity of the returned field depends on
Settings.getRenderNameStyle()
. By default, field aliases are
quoted, and thus case-sensitive!
public final Field<T> as(java.util.function.Function<? super Field<T>,? extends java.lang.String> aliasFunction)
Field
Note that the case-sensitivity of the returned field depends on
Settings.getRenderNameStyle()
. By default, field aliases are
quoted, and thus case-sensitive!
This works like Field.as(String)
, except that field aliases are
provided by a function. This is useful, for instance, to prefix all
columns with a common prefix (on Table.as(String, Function)
):
MY_TABLE.as("t1", f -> "prefix_" + f.getName());
And then to use the same function also for individual fields:
MY_TABLE.MY_COLUMN.as(f -> "prefix_" + f.getName());
public final java.lang.String getName()
Field
The name is any of these:
Param
getName
in interface Field<T>
getName
in interface SelectField<T>
public final Name getQualifiedName()
Field
getQualifiedName
in interface Field<T>
public final Name getUnqualifiedName()
Field
getUnqualifiedName
in interface Field<T>
public final java.lang.String getComment()
Field
If this Field
is a generated field from your database, it
may provide its DDL comment through this method. All other column
expressions return the empty string ""
here, never
null
.
getComment
in interface Field<T>
public final Converter<?,T> getConverter()
Field
Converter
.
By default, all fields reference an identity-converter
Converter<T, T>
. Custom data types may be obtained by a
custom Converter
placed on the generated TableField
.
getConverter
in interface Field<T>
getConverter
in interface SelectField<T>
public final Binding<?,T> getBinding()
Field
Binding
.getBinding
in interface Field<T>
getBinding
in interface SelectField<T>
public final DataType<T> getDataType()
Field
getDataType
in interface Field<T>
getDataType
in interface SelectField<T>
public final DataType<T> getDataType(Configuration configuration)
Field
getDataType
in interface Field<T>
getDataType
in interface SelectField<T>
public final java.lang.Class<T> getType()
Field
getType
in interface Field<T>
getType
in interface SelectField<T>
public final <Z> Field<Z> cast(Field<Z> field)
Field
This results in the same as casting this field to
DataType.getCastTypeName()
cast
in interface Field<T>
Z
- The generic type of the cast fieldfield
- The field whose type is used for the castField.cast(DataType)
public final <Z> Field<Z> cast(DataType<Z> type)
Field
public final <Z> Field<Z> cast(java.lang.Class<Z> type)
Field
The actual cast may not be accurate as the DataType
has to be
"guessed" from the jOOQ-configured data types. Use
Field.cast(DataType)
for more accurate casts.
cast
in interface Field<T>
Z
- The generic type of the cast fieldtype
- The type that is used for the castField.cast(DataType)
public final <Z> Field<Z> coerce(Field<Z> field)
Field
Unlike with casting, coercing doesn't affect the way the database sees a
Field
's type. This is how coercing affects your SQL:
// This binds an int value to a JDBC PreparedStatement
DSL.val(1).coerce(String.class);
// This binds an int value to a JDBC PreparedStatement
// and casts it to VARCHAR in SQL
DSL.val(1).cast(String.class);
// This fetches a String value for the BOOK.ID field from JDBC
BOOK.ID.coerce(String.class);
// This fetches a String value for the BOOK.ID field from JDBC
// after casting it to VARCHAR in the database
BOOK.ID.cast(String.class);
coerce
in interface Field<T>
Z
- The generic type of the coerced fieldfield
- The field whose type is used for the coercionField.coerce(DataType)
,
Field.cast(Field)
public final <Z> Field<Z> coerce(DataType<Z> type)
Field
Unlike with casting, coercing doesn't affect the way the database sees a
Field
's type. This is how coercing affects your SQL:
// This binds an int value to a JDBC PreparedStatement
DSL.val(1).coerce(String.class);
// This binds an int value to a JDBC PreparedStatement
// and casts it to VARCHAR in SQL
DSL.val(1).cast(String.class);
// This fetches a String value for the BOOK.ID field from JDBC
BOOK.ID.coerce(String.class);
// This fetches a String value for the BOOK.ID field from JDBC
// after casting it to VARCHAR in the database
BOOK.ID.cast(String.class);
coerce
in interface Field<T>
Z
- The generic type of the coerced fieldtype
- The data type that is used for the coercionField.cast(DataType)
public final <Z> Field<Z> coerce(java.lang.Class<Z> type)
Field
Unlike with casting, coercing doesn't affect the way the database sees a
Field
's type. This is how coercing affects your SQL:
// This binds an int value to a JDBC PreparedStatement
DSL.val(1).coerce(String.class);
// This binds an int value to a JDBC PreparedStatement
// and casts it to VARCHAR in SQL
DSL.val(1).cast(String.class);
// This fetches a String value for the BOOK.ID field from JDBC
BOOK.ID.coerce(String.class);
// This fetches a String value for the BOOK.ID field from JDBC
// after casting it to VARCHAR in the database
BOOK.ID.cast(String.class);
coerce
in interface Field<T>
Z
- The generic type of the coerced fieldtype
- The type that is used for the coercionField.coerce(DataType)
,
Field.cast(Class)
public final SortField<T> asc()
Field
This is the same as calling Field.sort(SortOrder)
with
SortOrder.ASC
public final SortField<T> desc()
Field
This is the same as calling Field.sort(SortOrder)
with
SortOrder.DESC
public final SortField<T> sortDefault()
Field
ASC
) from this field.
This is the same as calling Field.sort(SortOrder)
with
SortOrder.DEFAULT
sortDefault
in interface Field<T>
public final SortField<T> sort(SortOrder order)
Field
public final SortField<java.lang.Integer> sortAsc(java.util.Collection<T> sortList)
Field
Create a sort field of the form
CASE [this] WHEN [sortList.get(0)] THEN 0
WHEN [sortList.get(1)] THEN 1
...
WHEN [sortList.get(n)] THEN n
ELSE null
END ASC
Note: You can use this in combination with SortField.nullsFirst()
or SortField.nullsLast()
to specify whether the default should
have highest or lowest priority.
@SafeVarargs public final SortField<java.lang.Integer> sortAsc(T... sortList)
Field
Create a sort field of the form
CASE [this] WHEN [sortList[0]] THEN 0
WHEN [sortList[1]] THEN 1
...
WHEN [sortList[n]] THEN n
ELSE null
END ASC
Note: You can use this in combination with SortField.nullsFirst()
or SortField.nullsLast()
to specify whether the default should
have highest or lowest priority.
public final SortField<java.lang.Integer> sortDesc(java.util.Collection<T> sortList)
Field
Create a sort field of the form
CASE [this] WHEN [sortList.get(0)] THEN 0
WHEN [sortList.get(1)] THEN 1
...
WHEN [sortList.get(n)] THEN n
ELSE null
END DESC
Note: You can use this in combination with SortField.nullsFirst()
or SortField.nullsLast()
to specify whether the default should
have highest or lowest priority.
@SafeVarargs public final SortField<java.lang.Integer> sortDesc(T... sortList)
Field
Create a sort field of the form
CASE [this] WHEN [sortList[0]] THEN 0
WHEN [sortList[1]] THEN 1
...
WHEN [sortList[n]] THEN n
ELSE null
END DESC
Note: You can use this in combination with SortField.nullsFirst()
or SortField.nullsLast()
to specify whether the default should
have highest or lowest priority.
public final <Z> SortField<Z> sort(java.util.Map<T,Z> sortMap)
Field
Create a sort field of the form (in pseudo code)
CASE [this] WHEN [sortMap.key(0)] THEN sortMap.value(0)
WHEN [sortMap.key(1)] THEN sortMap.value(1)
...
WHEN [sortMap.key(n)] THEN sortMap.value(n)
ELSE null
END DESC
Note: You can use this in combination with SortField.nullsFirst()
or SortField.nullsLast()
to specify whether the default should
have highest or lowest priority.
public final Field<T> neg()
Field
This renders the same on all dialects: -[this]
public final Field<T> unaryMinus()
Field
This is an alias for Field.neg()
, which can be recognised by the
Kotlin language for operator overloading.
unaryMinus
in interface Field<T>
public final Field<T> unaryPlus()
Field
This can be recognised by the Kotlin language for operator overloading.
public final Field<T> add(java.lang.Number value)
Field
add
in interface Field<T>
Field.add(Field)
public Field<T> add(Field<?> value)
Field
The behaviour of this operation is as follows:
Operand 1 | Operand 2 | Result Type |
---|---|---|
Numeric | Numeric | Numeric |
Date / Time | Numeric | Date / Time |
Date / Time | Interval | Date / Time |
Interval | Interval | Interval |
public final Field<T> sub(java.lang.Number value)
Field
sub
in interface Field<T>
Field.sub(Field)
public final Field<T> sub(Field<?> value)
Field
Operand 1 | Operand 2 | Result Type |
---|---|---|
Numeric | Numeric | Numeric |
Date / Time | Numeric | Date / Time |
Date / Time | Interval | Date / Time |
Interval | Interval | Interval |
In order to subtract one date time field from another, use any of these methods:
public final Field<T> mul(java.lang.Number value)
Field
INTERVAL
field, then the result is also an
INTERVAL
field (see Interval
)public Field<T> mul(Field<? extends java.lang.Number> value)
Expression
to generate neater expressionspublic final Field<T> div(java.lang.Number value)
Field
INTERVAL
field, then the result is also an
INTERVAL
field (see Interval
)public final Field<T> div(Field<? extends java.lang.Number> value)
Field
INTERVAL
field, then the result is also an
INTERVAL
field (see Interval
)public final Field<T> mod(java.lang.Number value)
Field
This renders the modulo operation where available:
... or the modulo function
elsewhere: [this] % [value]
mod([this], [value])
public final Field<T> mod(Field<? extends java.lang.Number> value)
Field
This renders the modulo operation where available:
... or the modulo function
elsewhere: [this] % [value]
mod([this], [value])
public final Field<T> plus(java.lang.Number value)
Field
Field.add(Number)
.plus
in interface Field<T>
Field.add(Number)
public final Field<T> plus(Field<?> value)
Field
Field.add(Field)
.plus
in interface Field<T>
Field.add(Field)
public final Field<T> subtract(java.lang.Number value)
Field
Field.sub(Number)
.subtract
in interface Field<T>
Field.sub(Number)
public final Field<T> subtract(Field<?> value)
Field
Field.sub(Field)
.subtract
in interface Field<T>
Field.sub(Field)
public final Field<T> minus(java.lang.Number value)
Field
Field.sub(Number)
.minus
in interface Field<T>
Field.sub(Number)
public final Field<T> minus(Field<?> value)
Field
Field.sub(Field)
.minus
in interface Field<T>
Field.sub(Field)
public final Field<T> multiply(java.lang.Number value)
Field
Field.mul(Number)
.multiply
in interface Field<T>
Field.mul(Number)
public final Field<T> multiply(Field<? extends java.lang.Number> value)
Field
Field.mul(Field)
.multiply
in interface Field<T>
Field.mul(Field)
public final Field<T> times(java.lang.Number value)
Field
Field.mul(Number)
.times
in interface Field<T>
Field.mul(Number)
public final Field<T> times(Field<? extends java.lang.Number> value)
Field
Field.mul(Field)
.times
in interface Field<T>
Field.mul(Field)
public final Field<T> divide(java.lang.Number value)
Field
Field.div(Number)
.divide
in interface Field<T>
Field.div(Number)
public final Field<T> divide(Field<? extends java.lang.Number> value)
Field
Field.div(Field)
.divide
in interface Field<T>
Field.div(Field)
public final Field<T> modulo(java.lang.Number value)
Field
Field.mod(Number)
.modulo
in interface Field<T>
Field.mod(Number)
public final Field<T> modulo(Field<? extends java.lang.Number> value)
Field
Field.mod(Field)
.modulo
in interface Field<T>
Field.mod(Field)
public final Field<T> rem(java.lang.Number value)
Field
Field.mod(Number)
.rem
in interface Field<T>
Field.mod(Number)
public final Field<T> rem(Field<? extends java.lang.Number> value)
Field
Field.mod(Field)
.rem
in interface Field<T>
Field.mod(Field)
public final Field<T> bitNot()
Field
bitNot
in interface Field<T>
DSL.bitNot(Field)
public final Field<T> bitAnd(T value)
Field
bitAnd
in interface Field<T>
DSL.bitAnd(Field, Field)
public final Field<T> bitAnd(Field<T> value)
Field
bitAnd
in interface Field<T>
DSL.bitAnd(Field, Field)
public final Field<T> bitNand(T value)
Field
bitNand
in interface Field<T>
DSL.bitNand(Field, Field)
,
DSL.bitNot(Field)
public final Field<T> bitNand(Field<T> value)
Field
bitNand
in interface Field<T>
DSL.bitNand(Field, Field)
,
DSL.bitNot(Field)
public final Field<T> bitOr(T value)
Field
bitOr
in interface Field<T>
DSL.bitOr(Field, Field)
public final Field<T> bitOr(Field<T> value)
Field
bitOr
in interface Field<T>
DSL.bitOr(Field, Field)
public final Field<T> bitNor(T value)
Field
bitNor
in interface Field<T>
DSL.bitNor(Field, Field)
,
DSL.bitNot(Field)
public final Field<T> bitNor(Field<T> value)
Field
bitNor
in interface Field<T>
DSL.bitNor(Field, Field)
,
DSL.bitNot(Field)
public final Field<T> bitXor(T value)
Field
bitXor
in interface Field<T>
DSL.bitXor(Field, Field)
public final Field<T> bitXor(Field<T> value)
Field
bitXor
in interface Field<T>
DSL.bitXor(Field, Field)
public final Field<T> bitXNor(T value)
Field
bitXNor
in interface Field<T>
DSL.bitXNor(Field, Field)
,
DSL.bitNot(Field)
public final Field<T> bitXNor(Field<T> value)
Field
bitXNor
in interface Field<T>
DSL.bitXNor(Field, Field)
,
DSL.bitNot(Field)
public final Field<T> shl(java.lang.Number value)
Field
shl
in interface Field<T>
DSL.shl(Field, Field)
,
DSL.power(Field, Number)
public final Field<T> shl(Field<? extends java.lang.Number> value)
Field
shl
in interface Field<T>
DSL.shl(Field, Field)
,
DSL.power(Field, Number)
public final Field<T> shr(java.lang.Number value)
Field
shr
in interface Field<T>
DSL.shr(Field, Field)
,
DSL.power(Field, Number)
public final Field<T> shr(Field<? extends java.lang.Number> value)
Field
shr
in interface Field<T>
DSL.shr(Field, Field)
,
DSL.power(Field, Number)
public final Condition isNull()
Field
null
.
SQL: this is null
public final Condition isNotNull()
Field
null
.
SQL: this is not null
public final Condition isDistinctFrom(T value)
Field
DISTINCT
from
another value.
In SQLDialect.MYSQL
and SQLDialect.MARIADB
, this can be
emulated through not([this] <=> [value])
In SQLDialect.SQLITE
, this can be emulated through
[this] IS NOT [value]
In databases that support INTERSECT
(see
Select.intersect(Select)
, this predicate can be emulated as
follows:
NOT EXISTS (SELECT [this] INTERSECT SELECT [value])
If this is not supported by the underlying database, jOOQ will render
this instead:
SQL:
CASE WHEN [this] IS NULL AND [value] IS NULL THEN FALSE
WHEN [this] IS NULL AND [value] IS NOT NULL THEN TRUE
WHEN [this] IS NOT NULL AND [value] IS NULL THEN TRUE
WHEN [this] = [value] THEN FALSE
ELSE TRUE
END
this is distinct from value
isDistinctFrom
in interface Field<T>
public final Condition isDistinctFrom(Field<T> field)
Field
DISTINCT
from
another field.
In SQLDialect.MYSQL
and SQLDialect.MARIADB
, this can be
emulated through not([this] <=> [value])
In SQLDialect.SQLITE
, this can be emulated through
[this] IS NOT [value]
In databases that support INTERSECT
(see
Select.intersect(Select)
, this predicate can be emulated as
follows:
NOT EXISTS (SELECT [this] INTERSECT SELECT [value])
If this is not supported by the underlying database, jOOQ will render
this instead:
SQL:
CASE WHEN [this] IS NULL AND [field] IS NULL THEN FALSE
WHEN [this] IS NULL AND [field] IS NOT NULL THEN TRUE
WHEN [this] IS NOT NULL AND [field] IS NULL THEN TRUE
WHEN [this] = [field] THEN FALSE
ELSE TRUE
END
this is distinct from field
isDistinctFrom
in interface Field<T>
public final Condition isNotDistinctFrom(T value)
Field
NOT DISTINCT
from another value.
In SQLDialect.MYSQL
and SQLDialect.MARIADB
, this can be
emulated through [this] <=> [value]
In SQLDialect.SQLITE
, this can be emulated through
[this] IS [value]
In databases that support INTERSECT
(see
Select.intersect(Select)
, this predicate can be emulated as
follows:
EXISTS (SELECT [this] INTERSECT SELECT [value])
If this is not supported by the underlying database, jOOQ will render
this instead:
SQL:
CASE WHEN [this] IS NULL AND [value] IS NULL THEN TRUE
WHEN [this] IS NULL AND [value] IS NOT NULL THEN FALSE
WHEN [this] IS NOT NULL AND [value] IS NULL THEN FALSE
WHEN [this] = [value] THEN TRUE
ELSE FALSE
END
this is not distinct from value
isNotDistinctFrom
in interface Field<T>
public final Condition isNotDistinctFrom(Field<T> field)
Field
NOT DISTINCT
from another field.
In SQLDialect.MYSQL
and SQLDialect.MARIADB
, this can be
emulated through [this] <=> [value]
In SQLDialect.SQLITE
, this can be emulated through
[this] IS [value]
In databases that support INTERSECT
(see
Select.intersect(Select)
, this predicate can be emulated as
follows:
EXISTS (SELECT [this] INTERSECT SELECT [value])
If this is not supported by the underlying database, jOOQ will render
this instead:
SQL:
CASE WHEN [this] IS NULL AND [field] IS NULL THEN TRUE
WHEN [this] IS NULL AND [field] IS NOT NULL THEN FALSE
WHEN [this] IS NOT NULL AND [field] IS NULL THEN FALSE
WHEN [this] = [value] THEN TRUE
ELSE FALSE
END
this is not distinct from field
isNotDistinctFrom
in interface Field<T>
public final Condition isTrue()
Field
true
.
SQL:
lcase(this) in ("1", "y", "yes", "true", "on", "enabled")
public final Condition isFalse()
Field
false
.
SQL:
lcase(this) in ("0", "n", "no", "false", "off", "disabled")
public final LikeEscapeStep like(java.lang.String value)
Field
SQL: this like value
public final Condition like(java.lang.String value, char escape)
Field
SQL: this like value escape 'e'
like
in interface Field<T>
LikeEscapeStep.escape(char)
public final LikeEscapeStep like(Field<java.lang.String> field)
Field
SQL: this like value
public final Condition like(Field<java.lang.String> field, char escape)
Field
SQL: this like value escape 'e'
like
in interface Field<T>
LikeEscapeStep.escape(char)
public final LikeEscapeStep likeIgnoreCase(java.lang.String value)
Field
This translates to this ilike value
in
SQLDialect.POSTGRES
, or to
lower(this) like lower(value)
in all other dialects.
likeIgnoreCase
in interface Field<T>
public final Condition likeIgnoreCase(java.lang.String value, char escape)
Field
This translates to this ilike value
in
SQLDialect.POSTGRES
, or to
lower(this) like lower(value)
in all other dialects.
likeIgnoreCase
in interface Field<T>
LikeEscapeStep.escape(char)
public final LikeEscapeStep likeIgnoreCase(Field<java.lang.String> field)
Field
This translates to this ilike field
in
SQLDialect.POSTGRES
, or to
lower(this) like lower(field)
in all other dialects.
likeIgnoreCase
in interface Field<T>
public final Condition likeIgnoreCase(Field<java.lang.String> field, char escape)
Field
This translates to this ilike field
in
SQLDialect.POSTGRES
, or to
lower(this) like lower(field)
in all other dialects.
likeIgnoreCase
in interface Field<T>
LikeEscapeStep.escape(char)
public final Condition likeRegex(java.lang.String pattern)
Field
The SQL:2008 standard specifies a <regex like predicate>
of the following form:
<regex like predicate> ::=
<row value predicand> <regex like predicate part 2>
<regex like predicate part 2> ::=
[ NOT ] LIKE_REGEX <XQuery pattern> [ FLAG <XQuery option flag> ]
This particular LIKE_REGEX
operator comes in several
flavours for various databases. jOOQ supports regular expressions as
follows:
likeRegex
in interface Field<T>
Field.likeRegex(String)
public final Condition likeRegex(Field<java.lang.String> pattern)
Field
See Field.likeRegex(String)
for more details
likeRegex
in interface Field<T>
Field.likeRegex(String)
public final LikeEscapeStep notLike(java.lang.String value)
Field
SQL: this not like value
public final Condition notLike(java.lang.String value, char escape)
Field
SQL: this not like value escape 'e'
notLike
in interface Field<T>
LikeEscapeStep.escape(char)
public final LikeEscapeStep notLike(Field<java.lang.String> field)
Field
SQL: this not like field
public final Condition notLike(Field<java.lang.String> field, char escape)
Field
SQL: this not like field escape 'e'
notLike
in interface Field<T>
LikeEscapeStep.escape(char)
public final LikeEscapeStep notLikeIgnoreCase(java.lang.String value)
Field
This translates to this not ilike value
in
SQLDialect.POSTGRES
, or to
lower(this) not like lower(value)
in all other dialects.
notLikeIgnoreCase
in interface Field<T>
public final Condition notLikeIgnoreCase(java.lang.String value, char escape)
Field
This translates to this not ilike value
in
SQLDialect.POSTGRES
, or to
lower(this) not like lower(value)
in all other dialects.
notLikeIgnoreCase
in interface Field<T>
LikeEscapeStep.escape(char)
public final LikeEscapeStep notLikeIgnoreCase(Field<java.lang.String> field)
Field
This translates to this not ilike field
in
SQLDialect.POSTGRES
, or to
lower(this) not like lower(field)
in all other dialects.
notLikeIgnoreCase
in interface Field<T>
public final Condition notLikeIgnoreCase(Field<java.lang.String> field, char escape)
Field
This translates to this not ilike field
in
SQLDialect.POSTGRES
, or to
lower(this) not like lower(field)
in all other dialects.
notLikeIgnoreCase
in interface Field<T>
LikeEscapeStep.escape(char)
public final Condition notLikeRegex(java.lang.String pattern)
Field
See Field.likeRegex(String)
for more details
notLikeRegex
in interface Field<T>
Field.likeRegex(String)
public final Condition notLikeRegex(Field<java.lang.String> pattern)
Field
See Field.likeRegex(String)
for more details
notLikeRegex
in interface Field<T>
Field.likeRegex(Field)
public final Condition contains(T value)
Field
Field.like(String, char)
including proper
adding of wildcards and escaping.
SQL: this like ('%' || escape(value, '\') || '%') escape '\'
Note: This also works with numbers, for instance
val(1133).contains(13)
If you're using SQLDialect.POSTGRES
, then you can use this method
also to express the "ARRAY contains" operator. For example:
// Use this expression
val(new Integer[] { 1, 2, 3 }).contains(new Integer[] { 1, 2 })
// ... to render this SQL
ARRAY[1, 2, 3] @> ARRAY[1, 2]
Note, this does not correspond to the Oracle Text CONTAINS()
function. Refer to OracleDSL.contains(Field, String)
instead.
contains
in interface Field<T>
DSL.escape(String, char)
,
Field.like(String, char)
public final Condition contains(Field<T> value)
Field
Field.like(String, char)
including proper
adding of wildcards and escaping.
SQL: this like ('%' || escape(value, '\') || '%') escape '\'
Note: This also works with numbers, for instance
val(1133).contains(13)
If you're using SQLDialect.POSTGRES
, then you can use this method
also to express the "ARRAY contains" operator. For example:
// Use this expression
val(new Integer[] { 1, 2, 3 }).contains(new Integer[] { 1, 2 })
// ... to render this SQL
ARRAY[1, 2, 3] @> ARRAY[1, 2]
Note, this does not correspond to the Oracle Text CONTAINS()
function. Refer to OracleDSL.contains(Field, String)
instead.
contains
in interface Field<T>
DSL.escape(Field, char)
,
Field.like(Field, char)
public final Condition notContains(T value)
Field
Field.contains(Object)
.notContains
in interface Field<T>
public final Condition notContains(Field<T> value)
Field
Field.contains(Field)
.notContains
in interface Field<T>
public final Condition containsIgnoreCase(T value)
Field
Field.likeIgnoreCase(String, char)
including
proper adding of wildcards and escaping.
This translates to
this ilike ('%' || escape(value, '\') || '%') escape '\'
in
SQLDialect.POSTGRES
, or to
lower(this) not like lower(('%' || escape(value, '\') || '%') escape '\')
in all other dialects.
containsIgnoreCase
in interface Field<T>
DSL.escape(Field, char)
,
Field.likeIgnoreCase(String, char)
,
Field.contains(Object)
public final Condition containsIgnoreCase(Field<T> value)
Field
Field.likeIgnoreCase(String, char)
including
proper adding of wildcards and escaping.
This translates to
this not ilike ('%' || escape(value, '\') || '%') escape '\'
in SQLDialect.POSTGRES
, or to
lower(this) not like lower(('%' || escape(value, '\') || '%') escape '\')
in all other dialects.
containsIgnoreCase
in interface Field<T>
DSL.escape(Field, char)
,
Field.likeIgnoreCase(Field, char)
,
Field.contains(Field)
public final Condition notContainsIgnoreCase(T value)
Field
Field.containsIgnoreCase(Object)
notContainsIgnoreCase
in interface Field<T>
public final Condition notContainsIgnoreCase(Field<T> value)
Field
Field.containsIgnoreCase(Field)
notContainsIgnoreCase
in interface Field<T>
public final Condition startsWith(T value)
Field
Field.like(String, char)
including proper
adding of wildcards and escaping.
SQL: this like (escape(value, '\') || '%') escape '\'
Note: This also works with numbers, for instance
val(1133).startsWith(11)
startsWith
in interface Field<T>
DSL.escape(String, char)
,
Field.like(String, char)
public final Condition startsWith(Field<T> value)
Field
Field.like(String, char)
including proper
adding of wildcards and escaping.
SQL: this like (escape(value, '\') || '%') escape '\'
Note: This also works with numbers, for instance
val(1133).startsWith(11)
startsWith
in interface Field<T>
DSL.escape(Field, char)
,
Field.like(Field, char)
public final Condition endsWith(T value)
Field
Field.like(String, char)
including proper
adding of wildcards and escaping.
SQL: this like ('%' || escape(value, '\')) escape '\'
Note: This also works with numbers, for instance
val(1133).endsWith(33)
endsWith
in interface Field<T>
DSL.escape(String, char)
,
Field.like(String, char)
public final Condition endsWith(Field<T> value)
Field
Field.like(String, char)
including proper
adding of wildcards and escaping.
SQL: this like ('%' || escape(value, '\')) escape '\'
Note: This also works with numbers, for instance
val(1133).endsWith(33)
endsWith
in interface Field<T>
DSL.escape(Field, char)
,
Field.like(Field, char)
public final Condition in(T... values)
Field
SQL: this in (values...)
Note that generating dynamic SQL with arbitrary-length IN
predicates can cause cursor cache contention in some databases that use
unique SQL strings as a statement identifier (e.g.
SQLDialect.ORACLE
). In order to prevent such problems, you could
use Settings.isInListPadding()
to produce less distinct SQL
strings (see also
[#5600]), or you
could avoid IN
lists, and replace them with:
IN
predicates on temporary tablesIN
predicates on unnested array bind variablespublic final Condition in(Field<?>... values)
Field
SQL: this in (values...)
public final Condition in(java.util.Collection<?> values)
Field
SQL: this in (values...)
Note that generating dynamic SQL with arbitrary-length IN
predicates can cause cursor cache contention in some databases that use
unique SQL strings as a statement identifier (e.g.
SQLDialect.ORACLE
). In order to prevent such problems, you could
use Settings.isInListPadding()
to produce less distinct SQL
strings (see also
[#5600]), or you
could avoid IN
lists, and replace them with:
IN
predicates on temporary tablesIN
predicates on unnested array bind variablespublic final Condition in(Result<? extends Record1<T>> result)
Field
SQL: this in (values...)
Note that generating dynamic SQL with arbitrary-length IN
predicates can cause cursor cache contention in some databases that use
unique SQL strings as a statement identifier (e.g.
SQLDialect.ORACLE
). In order to prevent such problems, you could
use Settings.isInListPadding()
to produce less distinct SQL
strings (see also
[#5600]), or you
could avoid IN
lists, and replace them with:
IN
predicates on temporary tablesIN
predicates on unnested array bind variablespublic final Condition in(Select<? extends Record1<T>> query)
Field
Note that the subquery must return exactly one field. This is not checked by jOOQ and will result in syntax errors in the database, if not used correctly.
SQL: this in (select...)
public final Condition notIn(T... values)
Field
Note that if any of the passed values is NULL
, then the
condition will be NULL
(or false
, depending on
the dialect) as well. This is standard SQL behaviour.
SQL: this not in (values...)
Note that generating dynamic SQL with arbitrary-length
NOT IN
predicates can cause cursor cache contention in some
databases that use unique SQL strings as a statement identifier (e.g.
SQLDialect.ORACLE
). In order to prevent such problems, you could
use Settings.isInListPadding()
to produce less distinct SQL
strings (see also
[#5600]), or you
could avoid IN
lists, and replace them with:
NOT IN
predicates on temporary tablesNOT IN
predicates on unnested array bind variablespublic final Condition notIn(Field<?>... values)
Field
Note that if any of the passed values is NULL
, then the
condition will be NULL
(or false
, depending on
the dialect) as well. This is standard SQL behaviour.
SQL: this not in (values...)
public final Condition notIn(java.util.Collection<?> values)
Field
Note that if any of the passed values is NULL
, then the
condition will be NULL
(or false
, depending on
the dialect) as well. This is standard SQL behaviour.
SQL: this not in (values...)
Note that generating dynamic SQL with arbitrary-length
NOT IN
predicates can cause cursor cache contention in some
databases that use unique SQL strings as a statement identifier (e.g.
SQLDialect.ORACLE
). In order to prevent such problems, you could
use Settings.isInListPadding()
to produce less distinct SQL
strings (see also
[#5600]), or you
could avoid IN
lists, and replace them with:
NOT IN
predicates on temporary tablesNOT IN
predicates on unnested array bind variablespublic final Condition notIn(Result<? extends Record1<T>> result)
Field
Note that if any of the passed values is NULL
, then the
condition will be NULL
(or false
, depending on
the dialect) as well. This is standard SQL behaviour.
SQL: this in (values...)
Note that generating dynamic SQL with arbitrary-length
NOT IN
predicates can cause cursor cache contention in some
databases that use unique SQL strings as a statement identifier (e.g.
SQLDialect.ORACLE
). In order to prevent such problems, you could
use Settings.isInListPadding()
to produce less distinct SQL
strings (see also
[#5600]), or you
could avoid IN
lists, and replace them with:
NOT IN
predicates on temporary tablesNOT IN
predicates on unnested array bind variablespublic final Condition notIn(Select<? extends Record1<T>> query)
Field
Note that the subquery must return exactly one field. This is not checked by jOOQ and will result in syntax errors in the database, if not used correctly.
Note that if any of the passed values is NULL
, then the
condition will be NULL
(or false
, depending on
the dialect) as well. This is standard SQL behaviour.
SQL: this not in (select...)
public final Condition between(T minValue, T maxValue)
Field
This is the same as calling between(minValue).and(maxValue)
SQL: this between minValue and maxValue
public final Condition between(Field<T> minValue, Field<T> maxValue)
Field
This is the same as calling between(minValue).and(maxValue)
SQL: this between minValue and maxValue
public final Condition betweenSymmetric(T minValue, T maxValue)
Field
This is the same as calling
betweenSymmetric(minValue).and(maxValue)
SQL: this between symmetric minValue and maxValue
betweenSymmetric
in interface Field<T>
public final Condition betweenSymmetric(Field<T> minValue, Field<T> maxValue)
Field
This is the same as calling
betweenSymmetric(minValue).and(maxValue)
SQL: this between symmetric minValue and maxValue
betweenSymmetric
in interface Field<T>
public final Condition notBetween(T minValue, T maxValue)
Field
This is the same as calling
notBetween(minValue).and(maxValue)
SQL: this not between minValue and maxValue
notBetween
in interface Field<T>
public final Condition notBetween(Field<T> minValue, Field<T> maxValue)
Field
This is the same as calling
notBetween(minValue).and(maxValue)
SQL: this not between minValue and maxValue
notBetween
in interface Field<T>
public final Condition notBetweenSymmetric(T minValue, T maxValue)
Field
This is the same as calling
notBetweenSymmetric(minValue).and(maxValue)
SQL: this not between symmetric minValue and maxValue
notBetweenSymmetric
in interface Field<T>
public final Condition notBetweenSymmetric(Field<T> minValue, Field<T> maxValue)
Field
This is the same as calling
notBetweenSymmetric(minValue).and(maxValue)
SQL: this not between symmetric minValue and maxValue
notBetweenSymmetric
in interface Field<T>
public final BetweenAndStep<T> between(T minValue)
Field
SQL: this between minValue and maxValue
public final BetweenAndStep<T> between(Field<T> minValue)
Field
SQL: this between minValue and maxValue
public final BetweenAndStep<T> betweenSymmetric(T minValue)
Field
SQL: this between symmetric minValue and maxValue
betweenSymmetric
in interface Field<T>
public final BetweenAndStep<T> betweenSymmetric(Field<T> minValue)
Field
SQL: this between symmetric minValue and maxValue
betweenSymmetric
in interface Field<T>
public final BetweenAndStep<T> notBetween(T minValue)
Field
SQL: this not between minValue and maxValue
notBetween
in interface Field<T>
public final BetweenAndStep<T> notBetween(Field<T> minValue)
Field
SQL: this not between minValue and maxValue
notBetween
in interface Field<T>
public final BetweenAndStep<T> notBetweenSymmetric(T minValue)
Field
SQL: this not between symmetric minValue and maxValue
notBetweenSymmetric
in interface Field<T>
public final BetweenAndStep<T> notBetweenSymmetric(Field<T> minValue)
Field
SQL: this not between symmetric minValue and maxValue
notBetweenSymmetric
in interface Field<T>
public final Condition eq(T value)
Field
this = value
.eq
in interface Field<T>
Field.equal(Object)
public final Condition eq(Field<T> field)
Field
this = field
.eq
in interface Field<T>
Field.equal(Field)
public final Condition eq(Select<? extends Record1<T>> query)
Field
this = (Select<?> ...)
.eq
in interface Field<T>
Field.equal(Select)
public final Condition eq(QuantifiedSelect<? extends Record1<T>> query)
Field
this = [quantifier] (Select<?> ...)
.eq
in interface Field<T>
DSL.all(Field)
,
DSL.all(Select)
,
DSL.all(Object...)
,
DSL.any(Field)
,
DSL.any(Select)
,
DSL.any(Object...)
public final Condition ne(T value)
Field
this != value
.ne
in interface Field<T>
Field.notEqual(Object)
public final Condition ne(Field<T> field)
Field
this != field
.ne
in interface Field<T>
Field.notEqual(Field)
public final Condition ne(Select<? extends Record1<T>> query)
Field
this != (Select<?> ...)
.ne
in interface Field<T>
Field.notEqual(Select)
public final Condition ne(QuantifiedSelect<? extends Record1<T>> query)
Field
this != [quantifier] (Select<?> ...)
.ne
in interface Field<T>
DSL.all(Field)
,
DSL.all(Select)
,
DSL.all(Object...)
,
DSL.any(Field)
,
DSL.any(Select)
,
DSL.any(Object...)
public final Condition lt(T value)
Field
this < value
.lt
in interface Field<T>
Field.lessThan(Object)
public final Condition lt(Field<T> field)
Field
this < field
.lt
in interface Field<T>
Field.lessThan(Field)
public final Condition lt(Select<? extends Record1<T>> query)
Field
this < (Select<?> ...)
.lt
in interface Field<T>
Field.lessThan(Select)
public final Condition lt(QuantifiedSelect<? extends Record1<T>> query)
Field
this < [quantifier] (Select<?> ...)
.lt
in interface Field<T>
DSL.all(Field)
,
DSL.all(Select)
,
DSL.all(Object...)
,
DSL.any(Field)
,
DSL.any(Select)
,
DSL.any(Object...)
public final Condition le(T value)
Field
this <= value
.le
in interface Field<T>
Field.lessOrEqual(Object)
public final Condition le(Field<T> field)
Field
this <= field
.le
in interface Field<T>
Field.lessOrEqual(Field)
public final Condition le(Select<? extends Record1<T>> query)
Field
this <= (Select<?> ...)
.le
in interface Field<T>
Field.lessOrEqual(Select)
public final Condition le(QuantifiedSelect<? extends Record1<T>> query)
Field
this <= [quantifier] (Select<?> ...)
.le
in interface Field<T>
DSL.all(Field)
,
DSL.all(Select)
,
DSL.all(Object...)
,
DSL.any(Field)
,
DSL.any(Select)
,
DSL.any(Object...)
public final Condition gt(T value)
Field
this > value
.gt
in interface Field<T>
Field.greaterThan(Object)
public final Condition gt(Field<T> field)
Field
this > field
.gt
in interface Field<T>
Field.greaterThan(Field)
public final Condition gt(Select<? extends Record1<T>> query)
Field
this > (Select<?> ...)
.gt
in interface Field<T>
Field.greaterThan(Select)
public final Condition gt(QuantifiedSelect<? extends Record1<T>> query)
Field
this > [quantifier] (Select<?> ...)
.gt
in interface Field<T>
DSL.all(Field)
,
DSL.all(Select)
,
DSL.all(Object...)
,
DSL.any(Field)
,
DSL.any(Select)
,
DSL.any(Object...)
public final Condition ge(T value)
Field
this >= value
.ge
in interface Field<T>
Field.greaterOrEqual(Object)
public final Condition ge(Field<T> field)
Field
this >= field
.ge
in interface Field<T>
Field.greaterOrEqual(Field)
public final Condition ge(Select<? extends Record1<T>> query)
Field
this >= (Select<?> ...)
.ge
in interface Field<T>
Field.greaterOrEqual(Select)
public final Condition ge(QuantifiedSelect<? extends Record1<T>> query)
Field
this >= [quantifier] (Select<?> ...)
.ge
in interface Field<T>
DSL.all(Field)
,
DSL.all(Select)
,
DSL.all(Object...)
,
DSL.any(Field)
,
DSL.any(Select)
,
DSL.any(Object...)
public final Condition equal(Field<T> field)
Field
this = field
.public final Condition equalIgnoreCase(java.lang.String value)
Field
lower(this) = lower(value)
.equalIgnoreCase
in interface Field<T>
public final Condition equalIgnoreCase(Field<java.lang.String> value)
Field
lower(this) = lower(value)
.equalIgnoreCase
in interface Field<T>
public final Condition equal(Select<? extends Record1<T>> query)
Field
this = (Select<?> ...)
.public final Condition equal(QuantifiedSelect<? extends Record1<T>> query)
Field
this = [quantifier] (Select<?> ...)
.equal
in interface Field<T>
DSL.all(Field)
,
DSL.all(Select)
,
DSL.all(Object...)
,
DSL.any(Field)
,
DSL.any(Select)
,
DSL.any(Object...)
public final Condition notEqual(T value)
Field
this != value
.public final Condition notEqual(Field<T> field)
Field
this != field
.public final Condition notEqualIgnoreCase(java.lang.String value)
Field
lower(this) != lower(value)
.notEqualIgnoreCase
in interface Field<T>
public final Condition notEqualIgnoreCase(Field<java.lang.String> value)
Field
lower(this) != lower(value)
.notEqualIgnoreCase
in interface Field<T>
public final Condition notEqual(Select<? extends Record1<T>> query)
Field
this != (Select<?> ...)
.public final Condition notEqual(QuantifiedSelect<? extends Record1<T>> query)
Field
this != [quantifier] (Select<?> ...)
.notEqual
in interface Field<T>
DSL.all(Field)
,
DSL.all(Select)
,
DSL.all(Object...)
,
DSL.any(Field)
,
DSL.any(Select)
,
DSL.any(Object...)
public final Condition lessThan(T value)
Field
this < value
.public final Condition lessThan(Field<T> field)
Field
this < field
.public final Condition lessThan(Select<? extends Record1<T>> query)
Field
this < (Select<?> ...)
.public final Condition lessThan(QuantifiedSelect<? extends Record1<T>> query)
Field
this < [quantifier] (Select<?> ...)
.lessThan
in interface Field<T>
DSL.all(Field)
,
DSL.all(Select)
,
DSL.all(Object...)
,
DSL.any(Field)
,
DSL.any(Select)
,
DSL.any(Object...)
public final Condition lessOrEqual(T value)
Field
this <= value
.lessOrEqual
in interface Field<T>
public final Condition lessOrEqual(Field<T> field)
Field
this <= field
.lessOrEqual
in interface Field<T>
public final Condition lessOrEqual(Select<? extends Record1<T>> query)
Field
this <= (Select<?> ...)
.lessOrEqual
in interface Field<T>
public final Condition lessOrEqual(QuantifiedSelect<? extends Record1<T>> query)
Field
this <= [quantifier] (Select<?> ...)
.lessOrEqual
in interface Field<T>
DSL.all(Field)
,
DSL.all(Select)
,
DSL.all(Object...)
,
DSL.any(Field)
,
DSL.any(Select)
,
DSL.any(Object...)
public final Condition greaterThan(T value)
Field
this > value
.greaterThan
in interface Field<T>
public final Condition greaterThan(Field<T> field)
Field
this > field
.greaterThan
in interface Field<T>
public final Condition greaterThan(Select<? extends Record1<T>> query)
Field
this > (Select<?> ...)
.greaterThan
in interface Field<T>
public final Condition greaterThan(QuantifiedSelect<? extends Record1<T>> query)
Field
this > [quantifier] (Select<?> ...)
.greaterThan
in interface Field<T>
DSL.all(Field)
,
DSL.all(Select)
,
DSL.all(Object...)
,
DSL.any(Field)
,
DSL.any(Select)
,
DSL.any(Object...)
public final Condition greaterOrEqual(T value)
Field
this >= value
.greaterOrEqual
in interface Field<T>
public final Condition greaterOrEqual(Field<T> field)
Field
this >= field
.greaterOrEqual
in interface Field<T>
public final Condition greaterOrEqual(Select<? extends Record1<T>> query)
Field
this >= (Select<?> ...)
.greaterOrEqual
in interface Field<T>
public final Condition greaterOrEqual(QuantifiedSelect<? extends Record1<T>> query)
Field
this >= [quantifier] (Select<?> ...)
.greaterOrEqual
in interface Field<T>
DSL.all(Field)
,
DSL.all(Select)
,
DSL.all(Object...)
,
DSL.any(Field)
,
DSL.any(Select)
,
DSL.any(Object...)
public final Condition compare(Comparator comparator, T value)
Field
public final Condition compare(Comparator comparator, Field<T> field)
Field
public final Condition compare(Comparator comparator, Select<? extends Record1<T>> query)
Field
Consider Comparator.supportsSubselect()
to assess whether a
comparator can be used with this method.
public final Condition compare(Comparator comparator, QuantifiedSelect<? extends Record1<T>> query)
Field
Consider Comparator.supportsQuantifier()
to assess whether a
comparator can be used with this method.
public final Field<T> plus()
Field
Example:
TABLE1.COL.plus().eq(TABLE2.COL);
TABLE1.COL.eq(TABLE2.COL.plus());
The above will generate
TABLE1.COL(+) = TABLE2.COL
TABLE1.COL = TABLE2.COL(+)
@Deprecated public final Field<java.lang.Integer> sign()
Field
DSLContext
sign
in interface Field<T>
DSL.sign(Field)
@Deprecated public final Field<T> abs()
Field
DSLContext
abs
in interface Field<T>
DSL.abs(Field)
@Deprecated public final Field<T> round()
Field
DSLContext
round
in interface Field<T>
DSL.round(Field)
@Deprecated public final Field<T> round(int decimals)
Field
DSLContext
round
in interface Field<T>
DSL.round(Field, int)
@Deprecated public final Field<T> floor()
Field
DSLContext
floor
in interface Field<T>
DSL.floor(Field)
@Deprecated public final Field<T> ceil()
Field
DSLContext
ceil
in interface Field<T>
DSL.ceil(Field)
@Deprecated public final Field<java.math.BigDecimal> sqrt()
Field
DSLContext
sqrt
in interface Field<T>
DSL.sqrt(Field)
@Deprecated public final Field<java.math.BigDecimal> exp()
Field
DSLContext
exp
in interface Field<T>
DSL.exp(Field)
@Deprecated public final Field<java.math.BigDecimal> ln()
Field
DSLContext
ln
in interface Field<T>
DSL.ln(Field)
@Deprecated public final Field<java.math.BigDecimal> log(int base)
Field
DSLContext
log
in interface Field<T>
DSL.log(Field, int)
public final Field<java.math.BigDecimal> pow(java.lang.Number exponent)
Field
exponent
.
This renders the power operation where available:
... or the power function
elsewhere: [this] ^ [value]
power([this], [value])
pow
in interface Field<T>
DSL.power(Field, Number)
public final Field<java.math.BigDecimal> power(java.lang.Number exponent)
Field
Field.power(Number)
.power
in interface Field<T>
Field.power(Number)
public final Field<java.math.BigDecimal> pow(Field<? extends java.lang.Number> exponent)
Field
exponent
.
This renders the power operation where available:
... or the power function
elsewhere: [this] ^ [value]
power([this], [value])
pow
in interface Field<T>
DSL.power(Field, Field)
public final Field<java.math.BigDecimal> power(Field<? extends java.lang.Number> exponent)
Field
Field.power(Field)
.power
in interface Field<T>
Field.power(Field)
@Deprecated public final Field<java.math.BigDecimal> acos()
Field
DSLContext
acos
in interface Field<T>
DSL.acos(Field)
@Deprecated public final Field<java.math.BigDecimal> asin()
Field
DSLContext
asin
in interface Field<T>
DSL.asin(Field)
@Deprecated public final Field<java.math.BigDecimal> atan()
Field
DSLContext
atan
in interface Field<T>
DSL.atan(Field)
@Deprecated public final Field<java.math.BigDecimal> atan2(java.lang.Number y)
Field
DSLContext
atan2
in interface Field<T>
DSL.atan2(Field, Number)
@Deprecated public final Field<java.math.BigDecimal> atan2(Field<? extends java.lang.Number> y)
Field
DSLContext
atan2
in interface Field<T>
DSL.atan2(Field, Field)
@Deprecated public final Field<java.math.BigDecimal> cos()
Field
DSLContext
cos
in interface Field<T>
DSL.cos(Field)
@Deprecated public final Field<java.math.BigDecimal> sin()
Field
DSLContext
sin
in interface Field<T>
DSL.sin(Field)
@Deprecated public final Field<java.math.BigDecimal> tan()
Field
DSLContext
tan
in interface Field<T>
DSL.tan(Field)
@Deprecated public final Field<java.math.BigDecimal> cot()
Field
DSLContext
cot
in interface Field<T>
DSL.cot(Field)
@Deprecated public final Field<java.math.BigDecimal> sinh()
Field
DSLContext
sinh
in interface Field<T>
DSL.sinh(Field)
@Deprecated public final Field<java.math.BigDecimal> cosh()
Field
DSLContext
cosh
in interface Field<T>
DSL.cosh(Field)
@Deprecated public final Field<java.math.BigDecimal> tanh()
Field
DSLContext
tanh
in interface Field<T>
DSL.tanh(Field)
@Deprecated public final Field<java.math.BigDecimal> coth()
Field
DSLContext
coth
in interface Field<T>
DSL.coth(Field)
@Deprecated public final Field<java.math.BigDecimal> deg()
Field
DSLContext
deg
in interface Field<T>
DSL.deg(Field)
@Deprecated public final Field<java.math.BigDecimal> rad()
Field
DSLContext
rad
in interface Field<T>
DSL.rad(Field)
@Deprecated public final Field<java.lang.Integer> count()
Field
DSLContext
count
in interface Field<T>
DSL.count(Field)
@Deprecated public final Field<java.lang.Integer> countDistinct()
Field
DSLContext
countDistinct
in interface Field<T>
DSL.countDistinct(Field)
@Deprecated public final Field<T> max()
Field
DSLContext
max
in interface Field<T>
DSL.max(Field)
@Deprecated public final Field<T> min()
Field
DSLContext
min
in interface Field<T>
DSL.min(Field)
@Deprecated public final Field<java.math.BigDecimal> sum()
Field
DSLContext
sum
in interface Field<T>
DSL.sum(Field)
@Deprecated public final Field<java.math.BigDecimal> avg()
Field
DSLContext
avg
in interface Field<T>
DSL.avg(Field)
@Deprecated public final Field<java.math.BigDecimal> median()
Field
DSLContext
median
in interface Field<T>
DSL.median(Field)
@Deprecated public final Field<java.math.BigDecimal> stddevPop()
Field
DSLContext
stddevPop
in interface Field<T>
DSL.stddevPop(Field)
@Deprecated public final Field<java.math.BigDecimal> stddevSamp()
Field
DSLContext
stddevSamp
in interface Field<T>
DSL.stddevSamp(Field)
@Deprecated public final Field<java.math.BigDecimal> varPop()
Field
DSLContext
varPop
in interface Field<T>
DSL.varPop(Field)
@Deprecated public final Field<java.math.BigDecimal> varSamp()
Field
DSLContext
varSamp
in interface Field<T>
DSL.varSamp(Field)
@Deprecated public final WindowPartitionByStep<java.lang.Integer> countOver()
Field
DSLContext
countOver
in interface Field<T>
DSL.count(Field)
,
WindowOverStep.over()
@Deprecated public final WindowPartitionByStep<T> maxOver()
Field
DSLContext
maxOver
in interface Field<T>
DSL.max(Field)
,
WindowOverStep.over()
@Deprecated public final WindowPartitionByStep<T> minOver()
Field
DSLContext
minOver
in interface Field<T>
DSL.min(Field)
,
WindowOverStep.over()
@Deprecated public final WindowPartitionByStep<java.math.BigDecimal> sumOver()
Field
DSLContext
sumOver
in interface Field<T>
DSL.sum(Field)
,
WindowOverStep.over()
@Deprecated public final WindowPartitionByStep<java.math.BigDecimal> avgOver()
Field
DSLContext
avgOver
in interface Field<T>
DSL.avg(Field)
,
WindowOverStep.over()
@Deprecated public final WindowIgnoreNullsStep<T> firstValue()
Field
DSLContext
firstValue
in interface Field<T>
DSL.firstValue(Field)
,
WindowOverStep.over()
@Deprecated public final WindowIgnoreNullsStep<T> lastValue()
Field
DSLContext
lastValue
in interface Field<T>
DSL.lastValue(Field)
,
WindowOverStep.over()
@Deprecated public final WindowIgnoreNullsStep<T> lead()
Field
DSLContext
lead
in interface Field<T>
DSL.lead(Field)
,
WindowOverStep.over()
@Deprecated public final WindowIgnoreNullsStep<T> lead(int offset)
Field
DSLContext
lead
in interface Field<T>
DSL.lead(Field, int)
,
WindowOverStep.over()
@Deprecated public final WindowIgnoreNullsStep<T> lead(int offset, T defaultValue)
Field
DSLContext
lead
in interface Field<T>
DSL.lead(Field, int, Object)
,
WindowOverStep.over()
@Deprecated public final WindowIgnoreNullsStep<T> lead(int offset, Field<T> defaultValue)
Field
DSLContext
lead
in interface Field<T>
DSL.lead(Field, int, Field)
,
WindowOverStep.over()
@Deprecated public final WindowIgnoreNullsStep<T> lag()
Field
DSLContext
lag
in interface Field<T>
DSL.lag(Field)
,
WindowOverStep.over()
@Deprecated public final WindowIgnoreNullsStep<T> lag(int offset)
Field
DSLContext
lag
in interface Field<T>
DSL.lag(Field, int)
,
WindowOverStep.over()
@Deprecated public final WindowIgnoreNullsStep<T> lag(int offset, T defaultValue)
Field
DSLContext
lag
in interface Field<T>
DSL.lag(Field, int, Object)
,
WindowOverStep.over()
@Deprecated public final WindowIgnoreNullsStep<T> lag(int offset, Field<T> defaultValue)
Field
DSLContext
lag
in interface Field<T>
DSL.lag(Field, int, Field)
,
WindowOverStep.over()
@Deprecated public final WindowPartitionByStep<java.math.BigDecimal> stddevPopOver()
Field
DSLContext
stddevPopOver
in interface Field<T>
DSL.stddevPop(Field)
,
WindowOverStep.over()
@Deprecated public final WindowPartitionByStep<java.math.BigDecimal> stddevSampOver()
Field
DSLContext
stddevSampOver
in interface Field<T>
DSL.stddevSamp(Field)
,
WindowOverStep.over()
@Deprecated public final WindowPartitionByStep<java.math.BigDecimal> varPopOver()
Field
DSLContext
varPopOver
in interface Field<T>
DSL.varPop(Field)
,
WindowOverStep.over()
@Deprecated public final WindowPartitionByStep<java.math.BigDecimal> varSampOver()
Field
DSLContext
varSampOver
in interface Field<T>
DSL.varSamp(Field)
,
WindowOverStep.over()
@Deprecated public final Field<java.lang.String> upper()
Field
DSLContext
upper
in interface Field<T>
DSL.upper(Field)
@Deprecated public final Field<java.lang.String> lower()
Field
DSLContext
lower
in interface Field<T>
DSL.lower(Field)
@Deprecated public final Field<java.lang.String> trim()
Field
DSLContext
trim
in interface Field<T>
DSL.trim(Field)
@Deprecated public final Field<java.lang.String> rtrim()
Field
DSLContext
rtrim
in interface Field<T>
DSL.rtrim(Field)
@Deprecated public final Field<java.lang.String> ltrim()
Field
DSLContext
ltrim
in interface Field<T>
DSL.ltrim(Field)
@Deprecated public final Field<java.lang.String> rpad(Field<? extends java.lang.Number> length)
Field
DSLContext
rpad
in interface Field<T>
DSL.rpad(Field, Field)
@Deprecated public final Field<java.lang.String> rpad(int length)
Field
DSLContext
rpad
in interface Field<T>
DSL.rpad(Field, int)
@Deprecated public final Field<java.lang.String> rpad(Field<? extends java.lang.Number> length, Field<java.lang.String> character)
Field
DSLContext
rpad
in interface Field<T>
DSL.rpad(Field, Field, Field)
@Deprecated public final Field<java.lang.String> rpad(int length, char character)
Field
DSLContext
rpad
in interface Field<T>
DSL.rpad(Field, int, char)
@Deprecated public final Field<java.lang.String> lpad(Field<? extends java.lang.Number> length)
Field
DSLContext
lpad
in interface Field<T>
DSL.lpad(Field, Field)
@Deprecated public final Field<java.lang.String> lpad(int length)
Field
DSLContext
lpad
in interface Field<T>
DSL.lpad(Field, int)
@Deprecated public final Field<java.lang.String> lpad(Field<? extends java.lang.Number> length, Field<java.lang.String> character)
Field
DSLContext
lpad
in interface Field<T>
DSL.lpad(Field, Field, Field)
@Deprecated public final Field<java.lang.String> lpad(int length, char character)
Field
DSLContext
lpad
in interface Field<T>
DSL.lpad(Field, int, char)
@Deprecated public final Field<java.lang.String> repeat(java.lang.Number count)
Field
DSLContext
repeat
in interface Field<T>
DSL.repeat(Field, int)
@Deprecated public final Field<java.lang.String> repeat(Field<? extends java.lang.Number> count)
Field
DSLContext
repeat
in interface Field<T>
DSL.repeat(Field, Field)
@Deprecated public final Field<java.lang.String> replace(Field<java.lang.String> search)
Field
DSLContext
replace
in interface Field<T>
DSL.replace(Field, Field)
@Deprecated public final Field<java.lang.String> replace(java.lang.String search)
Field
DSLContext
replace
in interface Field<T>
DSL.replace(Field, String)
@Deprecated public final Field<java.lang.String> replace(Field<java.lang.String> search, Field<java.lang.String> replace)
Field
DSLContext
replace
in interface Field<T>
DSL.replace(Field, Field, Field)
@Deprecated public final Field<java.lang.String> replace(java.lang.String search, java.lang.String replace)
Field
DSLContext
replace
in interface Field<T>
DSL.replace(Field, String, String)
@Deprecated public final Field<java.lang.Integer> position(java.lang.String search)
Field
DSLContext
position
in interface Field<T>
DSL.position(Field, String)
@Deprecated public final Field<java.lang.Integer> position(Field<java.lang.String> search)
Field
DSLContext
position
in interface Field<T>
DSL.position(Field, Field)
@Deprecated public final Field<java.lang.Integer> ascii()
Field
DSLContext
ascii
in interface Field<T>
DSL.ascii(Field)
@Deprecated public final Field<java.lang.String> concat(Field<?>... fields)
Field
DSLContext
concat
in interface Field<T>
DSL.concat(Field...)
@Deprecated public final Field<java.lang.String> concat(java.lang.String... values)
Field
DSLContext
concat
in interface Field<T>
DSL.concat(String...)
@Deprecated public final Field<java.lang.String> substring(int startingPosition)
Field
DSLContext
substring
in interface Field<T>
DSL.substring(Field, int)
@Deprecated public final Field<java.lang.String> substring(Field<? extends java.lang.Number> startingPosition)
Field
DSLContext
substring
in interface Field<T>
DSL.substring(Field, Field)
@Deprecated public final Field<java.lang.String> substring(int startingPosition, int length)
Field
DSLContext
substring
in interface Field<T>
DSL.substring(Field, int, int)
@Deprecated public final Field<java.lang.String> substring(Field<? extends java.lang.Number> startingPosition, Field<? extends java.lang.Number> length)
Field
DSLContext
substring
in interface Field<T>
DSL.substring(Field, Field, Field)
@Deprecated public final Field<java.lang.Integer> length()
Field
DSLContext
length
in interface Field<T>
DSL.length(Field)
@Deprecated public final Field<java.lang.Integer> charLength()
Field
DSLContext
charLength
in interface Field<T>
DSL.charLength(Field)
@Deprecated public final Field<java.lang.Integer> bitLength()
Field
DSLContext
bitLength
in interface Field<T>
DSL.bitLength(Field)
@Deprecated public final Field<java.lang.Integer> octetLength()
Field
DSLContext
octetLength
in interface Field<T>
DSL.octetLength(Field)
@Deprecated public final Field<java.lang.Integer> extract(DatePart datePart)
Field
DSLContext
extract
in interface Field<T>
DSL.extract(Field, DatePart)
@Deprecated @SafeVarargs public final Field<T> greatest(T... others)
Field
DSLContext
greatest
in interface Field<T>
DSL.greatest(Field, Field...)
@Deprecated public final Field<T> greatest(Field<?>... others)
Field
DSLContext
greatest
in interface Field<T>
DSL.greatest(Field, Field...)
@Deprecated @SafeVarargs public final Field<T> least(T... others)
Field
DSLContext
least
in interface Field<T>
DSL.least(Field, Field...)
@Deprecated public final Field<T> least(Field<?>... others)
Field
DSLContext
least
in interface Field<T>
DSL.least(Field, Field...)
@Deprecated public final Field<T> nvl(T defaultValue)
Field
DSLContext
nvl
in interface Field<T>
DSL.nvl(Field, Object)
@Deprecated public final Field<T> nvl(Field<T> defaultValue)
Field
DSLContext
nvl
in interface Field<T>
DSL.nvl(Field, Field)
@Deprecated public final <Z> Field<Z> nvl2(Z valueIfNotNull, Z valueIfNull)
Field
DSLContext
nvl2
in interface Field<T>
DSL.nvl2(Field, Object, Object)
@Deprecated public final <Z> Field<Z> nvl2(Field<Z> valueIfNotNull, Field<Z> valueIfNull)
Field
DSLContext
nvl2
in interface Field<T>
DSL.nvl2(Field, Field, Field)
@Deprecated public final Field<T> nullif(T other)
Field
DSLContext
nullif
in interface Field<T>
DSL.nullif(Field, Object)
@Deprecated public final Field<T> nullif(Field<T> other)
Field
DSLContext
nullif
in interface Field<T>
DSL.nullif(Field, Field)
@Deprecated public final <Z> Field<Z> decode(T search, Z result)
Field
DSLContext
decode
in interface Field<T>
DSL.decode(Object, Object, Object)
@Deprecated public final <Z> Field<Z> decode(T search, Z result, java.lang.Object... more)
Field
DSLContext
decode
in interface Field<T>
DSL.decode(Object, Object, Object, Object...)
@Deprecated public final <Z> Field<Z> decode(Field<T> search, Field<Z> result)
Field
DSLContext
decode
in interface Field<T>
DSL.decode(Field, Field, Field)
@Deprecated public final <Z> Field<Z> decode(Field<T> search, Field<Z> result, Field<?>... more)
Field
DSLContext
decode
in interface Field<T>
DSL.decode(Field, Field, Field, Field...)
@Deprecated @SafeVarargs public final Field<T> coalesce(T option, T... options)
Field
DSLContext
coalesce
in interface Field<T>
DSL.coalesce(Object, Object...)
@Deprecated public final Field<T> coalesce(Field<T> option, Field<?>... options)
Field
DSLContext
coalesce
in interface Field<T>
DSL.coalesce(Field, Field...)
public boolean equals(java.lang.Object that)
QueryPart
QueryPart
can be considered equal to
another QueryPart
.
In general, QueryPart
equality is defined in terms of
QueryPart.toString()
equality. In other words, two query parts are
considered equal if their rendered SQL (with inlined bind variables) is
equal. This means that the two query parts do not necessarily have to be
of the same type.
Some QueryPart
implementations may choose to override this
behaviour for improved performance, as QueryPart.toString()
is an
expensive operation, if called many times.
public int hashCode()
QueryPart
QueryPart
.
In general, QueryPart
hash codes are the same as the hash
codes generated from QueryPart.toString()
. This guarantees consistent
behaviour with QueryPart.equals(Object)
Some QueryPart
implementations may choose to override this
behaviour for improved performance, as QueryPart.toString()
is an
expensive operation, if called many times.
@Deprecated public final void toSQL(RenderContext context)
QueryPartInternal.accept(Context)
instead.QueryPartInternal
QueryPart
to a SQL string contained in
context.sql()
. The context
will contain
additional information about how to render this QueryPart
,
e.g. whether this QueryPart
should be rendered as a
declaration or reference, whether this QueryPart
's contained
bind variables should be inlined or replaced by '?'
, etc.toSQL
in interface QueryPartInternal
@Deprecated public final void bind(BindContext context) throws DataAccessException
QueryPartInternal.accept(Context)
instead.QueryPartInternal
QueryPart
to a PreparedStatement
This method is for JOOQ INTERNAL USE only. Do not reference directly
bind
in interface QueryPartInternal
context
- The context holding the next bind index and other information
for variable bindingDataAccessException
- If something went wrong while binding a
variablepublic boolean declaresFields()
declaresFields
in interface QueryPartInternal
public boolean declaresTables()
declaresTables
in interface QueryPartInternal
public boolean declaresWindows()
declaresWindows
in interface QueryPartInternal
public boolean declaresCTE()
declaresCTE
in interface QueryPartInternal
public boolean generatesCast()
generatesCast
in interface QueryPartInternal
public java.lang.String toString()
QueryPart
QueryPart
.
For improved debugging, this renders a SQL string of this
QueryPart
with inlined bind variables. If this
QueryPart
is Attachable
, then the attached
Configuration
may be used for rendering the SQL string, including
SQLDialect
and Settings
. Do note that most
QueryPart
instances are not attached to a
Configuration
, and thus there is no guarantee that the SQL string
will make sense in the context of a specific database.
If you wish to gain more control over the concrete SQL rendering of this
QueryPart
, use DSLContext.renderContext()
to obtain
a configurable render context for SQL rendering.
protected final DSLContext create()
protected final DSLContext create(Configuration configuration)
protected final DSLContext create(Context<?> ctx)
protected final DataAccessException translate(java.lang.String sql, java.sql.SQLException e)
Copyright © 2018. All Rights Reserved.