Skip to content

Commit

Permalink
0005003: Oracle: Geometry column type can not be used in a where clause
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip Marzullo committed May 25, 2021
1 parent 24753da commit d87f547
Showing 1 changed file with 13 additions and 1 deletion.
Expand Up @@ -30,6 +30,7 @@
import org.apache.commons.lang3.StringUtils;
import org.jumpmind.db.model.Column;
import org.jumpmind.db.model.Transaction;
import org.jumpmind.db.model.TypeMap;
import org.jumpmind.db.model.Table;
import org.jumpmind.db.platform.AbstractJdbcDatabasePlatform;
import org.jumpmind.db.platform.DatabaseNamesConstants;
Expand Down Expand Up @@ -108,7 +109,18 @@ public String getDefaultSchema() {

@Override
public boolean canColumnBeUsedInWhereClause(Column column) {
return !isLob(column.getJdbcTypeCode());
return !(isLob(column.getJdbcTypeCode()) || isGeometry(column));
}

private boolean isGeometry(Column column) {
String name = column.getJdbcTypeName();
if (name != null && (
name.toUpperCase().contains(TypeMap.GEOMETRY) ||
name.toUpperCase().contains(TypeMap.GEOGRAPHY))) {
return true;
} else {
return false;
}
}

@Override
Expand Down

0 comments on commit d87f547

Please sign in to comment.