[jOOQ/jOOQ#11083] DataType should cache null_() and notNull() variants
This commit is contained in:
parent
181d838797
commit
1740abe739
@ -85,21 +85,24 @@ abstract class AbstractDataTypeX<T> extends AbstractDataType<T> {
|
||||
|
||||
@Override
|
||||
public /* non-final */ DataType<T> nullability(Nullability n) {
|
||||
return construct(
|
||||
precision0(),
|
||||
scale0(),
|
||||
length0(),
|
||||
n,
|
||||
hidden(),
|
||||
readonly(),
|
||||
generatedAlwaysAsGenerator(),
|
||||
generationOption(),
|
||||
generationLocation(),
|
||||
collation(),
|
||||
characterSet(),
|
||||
!n.nullable() && identity(),
|
||||
defaultValue()
|
||||
);
|
||||
if (n == nullability())
|
||||
return this;
|
||||
else
|
||||
return construct(
|
||||
precision0(),
|
||||
scale0(),
|
||||
length0(),
|
||||
n,
|
||||
hidden(),
|
||||
readonly(),
|
||||
generatedAlwaysAsGenerator(),
|
||||
generationOption(),
|
||||
generationLocation(),
|
||||
collation(),
|
||||
characterSet(),
|
||||
!n.nullable() && identity(),
|
||||
defaultValue()
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Loading…
Reference in New Issue
Block a user