← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14063: Analytics, quoting remaining columns

 

------------------------------------------------------------
revno: 14063
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-02-18 10:39:18 +0100
message:
  Analytics, quoting remaining columns
modified:
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/AbstractJdbcTableManager.java
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTableManager.java
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTargetTableManager.java
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManager.java
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcOrgUnitTargetTableManager.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/AbstractJdbcTableManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/AbstractJdbcTableManager.java	2014-02-09 15:58:24 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/AbstractJdbcTableManager.java	2014-02-18 09:39:18 +0000
@@ -95,7 +95,7 @@
      * third column holds a table alias and name. Column names are quoted.
      * 
      * <ul>
-     * <li>0 = database column name</li>
+     * <li>0 = database column name (quoted)</li>
      * <li>1 = database column data type</li>
      * <li>2 = column alias and name</li>
      * </ul>

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java	2014-02-12 15:47:58 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java	2014-02-18 09:39:18 +0000
@@ -254,9 +254,9 @@
             columns.add( col );
         }
         
-        String[] de = { "de", "character(11) not null", "de.uid" };
-        String[] co = { "co", "character(11) not null", "co.uid" };
-        String[] level = { "level", "integer", "ous.level" };
+        String[] de = { quote( "de" ), "character(11) not null", "de.uid" };
+        String[] co = { quote( "co" ), "character(11) not null", "co.uid" };
+        String[] level = { quote( "level" ), "integer", "ous.level" };
         
         columns.addAll( Arrays.asList( de, co, level ) );
         

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTableManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTableManager.java	2014-02-09 15:36:46 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTableManager.java	2014-02-18 09:39:18 +0000
@@ -167,7 +167,7 @@
             columns.add( col );
         }
         
-        String[] ds = { "ds", "character(11) not null", "ds.uid" };
+        String[] ds = { quote( "ds" ), "character(11) not null", "ds.uid" };
         
         columns.add( ds );
         

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTargetTableManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTargetTableManager.java	2014-01-30 10:13:58 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTargetTableManager.java	2014-02-18 09:39:18 +0000
@@ -154,7 +154,7 @@
             columns.add( col );
         }
 
-        String[] ds = { "ds", "character(11) not null", "ds.uid" };
+        String[] ds = { quote( "ds" ), "character(11) not null", "ds.uid" };
         
         columns.add( ds );
         

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManager.java	2014-02-13 14:12:18 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManager.java	2014-02-18 09:39:18 +0000
@@ -237,14 +237,14 @@
             columns.add( col );
         }
 
-        String[] psi = { "psi", "character(11) not null", "psi.uid" };
-        String[] ps = { "ps", "character(11) not null", "ps.uid" };
-        String[] ed = { "executiondate", "timestamp", "psi.executiondate" };
-        String[] longitude = { "longitude", dbl, "psi.longitude" };
-        String[] latitude = { "latitude", dbl, "psi.latitude" };
-        String[] ou = { "ou", "character(11) not null", "ou.uid" };
-        String[] oun = { "ouname", "character varying(230) not null", "ou.name" };
-        String[] ouc = { "oucode", "character varying(50)", "ou.code" };
+        String[] psi = { quote( "psi" ), "character(11) not null", "psi.uid" };
+        String[] ps = { quote( "ps" ), "character(11) not null", "ps.uid" };
+        String[] ed = { quote( "executiondate" ), "timestamp", "psi.executiondate" };
+        String[] longitude = { quote( "longitude" ), dbl, "psi.longitude" };
+        String[] latitude = { quote( "latitude" ), dbl, "psi.latitude" };
+        String[] ou = { quote( "ou" ), "character(11) not null", "ou.uid" };
+        String[] oun = { quote( "ouname" ), "character varying(230) not null", "ou.name" };
+        String[] ouc = { quote( "oucode" ), "character varying(50)", "ou.code" };
 
         columns.addAll( Arrays.asList( psi, ps, ed, longitude, latitude, ou, oun, ouc ) );
 

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcOrgUnitTargetTableManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcOrgUnitTargetTableManager.java	2014-01-31 18:08:43 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcOrgUnitTargetTableManager.java	2014-02-18 09:39:18 +0000
@@ -144,7 +144,7 @@
             columns.add( col );
         }
 
-        String[] ds = { "oug", "character(11) not null", "oug.uid" };
+        String[] ds = { quote( "oug" ), "character(11) not null", "oug.uid" };
         
         columns.add( ds );