Mercurial > dive4elements > gnv-client
changeset 277:f304f2f12db4
Changed the splitting of the Statements for ARCSDE-Transformation.
Now it is possible to use a Select-Statement as an Table.
geo-backend/trunk@312 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Tue, 10 Nov 2009 11:47:59 +0000 |
parents | 6503bc864017 |
children | 095486545edf |
files | geo-backend/ChangeLog geo-backend/src/main/java/de/intevation/gnv/geobackend/sde/datasources/ArcSDEStatement.java |
diffstat | 2 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/geo-backend/ChangeLog Fri Nov 06 09:32:48 2009 +0000 +++ b/geo-backend/ChangeLog Tue Nov 10 11:47:59 2009 +0000 @@ -1,3 +1,9 @@ +2009-11-10 Tim Englich <tim.englich@intevation.de> + + * src/main/java/de/intevation/gnv/geobackend/sde/datasources/ArcSDEStatement.java (executeQuery): + Changed the splitting of the Statements for ARCSDE-Transformation. + Now it is possible to use a Select-Statement as an Table. + 2009-11-06 Ingo Weinzierl <ingo.weinzierl@intevation.de> * target/**: Removed. Should not be in version control.
--- a/geo-backend/src/main/java/de/intevation/gnv/geobackend/sde/datasources/ArcSDEStatement.java Fri Nov 06 09:32:48 2009 +0000 +++ b/geo-backend/src/main/java/de/intevation/gnv/geobackend/sde/datasources/ArcSDEStatement.java Tue Nov 10 11:47:59 2009 +0000 @@ -127,9 +127,10 @@ String[] values = statement.toLowerCase().split("where", 2); String where = values.length > 1 ? values[1].trim() : ""; - values = values[0].split("from", 2); - String[] tableNames = values[1].toUpperCase().trim().split(","); - String[] returnFields = values[0].replaceAll("select", "").trim().split(","); + String[] tableNames = values[0].substring(values[0].indexOf("from")).replaceFirst("from", "").toUpperCase().trim().split(", "); + String columnValueString = values[0].substring(0, values[0].indexOf("from")).trim(); + columnValueString = columnValueString.replaceFirst("select", "").trim(); + String[] returnFields = columnValueString.split(","); String geometryColumnName = null; String byClause = null; int byClausePos = where.indexOf("group by");