changeset 1097:94df49614d92

Made it Oracle compatible flys-artifacts/trunk@2600 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 26 Aug 2011 15:32:58 +0000
parents 9f88cc54570c
children 1ea7eb72aaa6
files flys-artifacts/ChangeLog flys-artifacts/doc/conf/meta-data.xml flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/templating/CompiledStatement.java
diffstat 3 files changed, 17 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Fri Aug 26 15:01:20 2011 +0000
+++ b/flys-artifacts/ChangeLog	Fri Aug 26 15:32:58 2011 +0000
@@ -1,3 +1,11 @@
+2011-08-26  Sascha L. Teichmann <sascha.teichmann@intevation.de>
+
+	* doc/conf/meta-data.xml: Made it Oracle compatible.
+
+	* src/main/java/de/intevation/flys/artifacts/datacage/templating/CompiledStatement.java:
+	  If running in debug mode log executed statements.
+	  Helps debugging Oracle connections.
+
 2011-08-26  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java:
--- a/flys-artifacts/doc/conf/meta-data.xml	Fri Aug 26 15:01:20 2011 +0000
+++ b/flys-artifacts/doc/conf/meta-data.xml	Fri Aug 26 15:32:58 2011 +0000
@@ -64,7 +64,7 @@
       <dc:context connection="system">
         <dc:statement>
           SELECT id AS river_id, name as river_name FROM rivers
-          WHERE name ILIKE ${river}
+          WHERE lower(name) LIKE lower(${river})
         </dc:statement>
         <dc:elements>
           <river>
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/templating/CompiledStatement.java	Fri Aug 26 15:01:20 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/templating/CompiledStatement.java	Fri Aug 26 15:32:58 2011 +0000
@@ -85,6 +85,10 @@
 
             ResultData data;
 
+            if (log.isDebugEnabled()) {
+                log.debug("executing: " + statement);
+            }
+
             ResultSet result = preparedStatement.executeQuery();
             try {
                 data = new ResultData(preparedStatement.getMetaData())
@@ -121,6 +125,10 @@
                 }
             }
 
+            if (log.isDebugEnabled()) {
+                log.debug("executing: " + statement);
+            }
+
             ResultSet result = preparedStatement.executeQuery();
             try {
                 return new ResultData(preparedStatement.getMetaData())

http://dive4elements.wald.intevation.org