[jOOQ/jOOQ#12737] DataType.isSpatial() is a commercial feature
This commit is contained in:
parent
ddc9762698
commit
97c455e748
@ -1053,8 +1053,13 @@ public interface DataType<T> extends Named {
|
||||
*/
|
||||
boolean isXML();
|
||||
|
||||
/**
|
||||
* Whether this data type is a spatial type.
|
||||
*/
|
||||
boolean isSpatial();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -755,11 +755,15 @@ implements
|
||||
return tType0() == XML.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isSpatial() {
|
||||
Class<?> tType = tType0();
|
||||
return tType == Geometry.class || tType == Geography.class;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public final void accept(Context<?> ctx) {
|
||||
|
||||
@ -745,7 +745,11 @@ public class DefaultBinding<T, U> implements Binding<T, U> {
|
||||
}
|
||||
|
||||
// [#7242] Other vendor specific types also need a lot of casting
|
||||
if (dataType.isJSON() || dataType.isSpatial()) {
|
||||
if (dataType.isJSON()
|
||||
|
||||
|
||||
|
||||
) {
|
||||
switch (ctx.family()) {
|
||||
|
||||
|
||||
@ -818,7 +822,9 @@ public class DefaultBinding<T, U> implements Binding<T, U> {
|
||||
(sqlDataType == null ||
|
||||
(!sqlDataType.isTemporal()
|
||||
&& sqlDataType != SQLDataType.UUID
|
||||
&& !sqlDataType.isSpatial()
|
||||
|
||||
|
||||
|
||||
&& !sqlDataType.isJSON())))
|
||||
sql(ctx, converted);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user