[jOOQ/jOOQ#10936] Add DataType.null_() and notNull() as synonyms for nullable(boolean)
This commit is contained in:
parent
574370f1ee
commit
c06bbc4008
@ -326,6 +326,22 @@ public interface DataType<T> extends Named {
|
||||
*/
|
||||
boolean nullable();
|
||||
|
||||
/**
|
||||
* Synonym for {@link #nullable(boolean)}, passing <code>true</code> as an
|
||||
* argument.
|
||||
*/
|
||||
@NotNull
|
||||
@Support
|
||||
DataType<T> null_();
|
||||
|
||||
/**
|
||||
* Synonym for {@link #nullable(boolean)}, passing <code>false</code> as an
|
||||
* argument.
|
||||
*/
|
||||
@NotNull
|
||||
@Support
|
||||
DataType<T> notNull();
|
||||
|
||||
/**
|
||||
* Return a new data type like this, with a new collation.
|
||||
*/
|
||||
|
||||
@ -137,6 +137,16 @@ abstract class AbstractDataType<T> extends AbstractNamed implements DataType<T>
|
||||
return nullability().nullable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final DataType<T> null_() {
|
||||
return nullable(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataType<T> notNull() {
|
||||
return nullable(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final DataType<T> collation(Collation c) {
|
||||
return construct(precision0(), scale0(), length0(), nullability(), c, characterSet(), identity(), defaultValue());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user