[jOOQ/jOOQ#14790] Add DataType.isUUID()

This commit is contained in:
Lukas Eder 2023-03-14 19:36:07 +01:00
parent 490f5b26a6
commit 73df9474ef
2 changed files with 11 additions and 0 deletions

View File

@ -1460,4 +1460,9 @@ public interface DataType<T> extends Named {
* Whether this data type is a spatial type.
*/
boolean isSpatial();
/**
* Whether this data type is a UUID type.
*/
boolean isUUID();
}

View File

@ -75,6 +75,7 @@ import java.time.OffsetTime;
import java.util.Collection;
import java.util.List;
import java.util.Set;
import java.util.UUID;
import java.util.function.Supplier;
// ...
@ -947,6 +948,11 @@ implements
return tType == Geometry.class || tType == Geography.class;
}
@Override
public final boolean isUUID() {
return tType0() == UUID.class;
}
@Override
public final void accept(Context<?> ctx) {
switch (ctx.family()) {