empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doeb...@apache.org
Subject svn commit: r1291959 - in /empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/column: DBAbstractFuncExpr.java DBCaseExpr.java DBConcatExpr.java DBCountExpr.java
Date Tue, 21 Feb 2012 19:14:40 GMT
Author: doebele
Date: Tue Feb 21 19:14:39 2012
New Revision: 1291959

URL: http://svn.apache.org/viewvc?rev=1291959&view=rev
Log:
EMPIREDB-135

Modified:
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/column/DBAbstractFuncExpr.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/column/DBCaseExpr.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/column/DBConcatExpr.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/column/DBCountExpr.java

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/column/DBAbstractFuncExpr.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/column/DBAbstractFuncExpr.java?rev=1291959&r1=1291958&r2=1291959&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/column/DBAbstractFuncExpr.java
(original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/column/DBAbstractFuncExpr.java
Tue Feb 21 19:14:39 2012
@@ -176,7 +176,7 @@ public abstract class DBAbstractFuncExpr
         } 
         // append
         sql.append(prefix);
-        expr.addSQL(sql, context & ~CTX_ALIAS );
+        expr.addSQL(sql, (context & ~CTX_ALIAS));
         sql.append(postfix);
     }
 

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/column/DBCaseExpr.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/column/DBCaseExpr.java?rev=1291959&r1=1291958&r2=1291959&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/column/DBCaseExpr.java
(original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/column/DBCaseExpr.java
Tue Feb 21 19:14:39 2012
@@ -99,7 +99,7 @@ public class DBCaseExpr extends DBColumn
     @Override
     public void addSQL(StringBuilder sql, long context)
     {
-        // context = context & ~CTX_ALIAS;
+        context &= ~CTX_ALIAS; // No column aliases
         sql.append("CASE WHEN ");
         compExpr.addSQL(sql, context);
         sql.append( " THEN ");

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/column/DBConcatExpr.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/column/DBConcatExpr.java?rev=1291959&r1=1291958&r2=1291959&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/column/DBConcatExpr.java
(original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/column/DBConcatExpr.java
Tue Feb 21 19:14:39 2012
@@ -144,6 +144,7 @@ public class DBConcatExpr extends DBColu
     public void addSQL(StringBuilder buf, long context)
     { // Zusammenbauen
         String template = getDatabase().getDriver().getSQLPhrase(DBDatabaseDriver.SQL_CONCAT_EXPR);
+        context &= ~CTX_ALIAS; // No column aliases
         // Find Separator
         int sep = template.indexOf('?');
         if (sep >= 0)

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/column/DBCountExpr.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/column/DBCountExpr.java?rev=1291959&r1=1291958&r2=1291959&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/column/DBCountExpr.java
(original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/column/DBCountExpr.java
Tue Feb 21 19:14:39 2012
@@ -155,7 +155,7 @@ public class DBCountExpr extends DBColum
         {   // count(distinct column)
             if (distinct)
                 sql.append("distinct "); 
-            column.addSQL(sql, context);
+            column.addSQL(sql, (context & ~CTX_ALIAS));
         }
         else
         {   // count(*)



Mime
View raw message