empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doeb...@apache.org
Subject svn commit: r1621259 - in /empire-db/trunk/empire-db/src/main/java/org/apache/empire/db: DBDatabaseDriver.java expr/column/DBAliasExpr.java
Date Fri, 29 Aug 2014 08:09:54 GMT
Author: doebele
Date: Fri Aug 29 08:09:53 2014
New Revision: 1621259

URL: http://svn.apache.org/r1621259
Log:
EMPIREDB-209

Modified:
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabaseDriver.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/column/DBAliasExpr.java

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabaseDriver.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabaseDriver.java?rev=1621259&r1=1621258&r2=1621259&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabaseDriver.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabaseDriver.java Fri
Aug 29 08:09:53 2014
@@ -117,7 +117,8 @@ public abstract class DBDatabaseDriver i
                                                                   };        
     protected static final String[] GENERAL_SQL_KEYWORDS = new String[] { "user", "group",

                                                            "table", "column", "view", "index",
"constraint", 
-                                                           "select", "udpate", "insert",
"alter", "delete" };        
+                                                           "select", "udpate", "insert",
"alter", "delete", 
+                                                           "order" };        
     protected final Set<String> reservedSQLKeywords;
 
     /**

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/column/DBAliasExpr.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/column/DBAliasExpr.java?rev=1621259&r1=1621258&r2=1621259&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/column/DBAliasExpr.java
(original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/column/DBAliasExpr.java
Fri Aug 29 08:09:53 2014
@@ -168,11 +168,12 @@ public class DBAliasExpr extends DBColum
         {   // Add the column expression
             expr.addSQL(buf, context);
             // Rename
-            String asExpr = getDatabase().getDriver().getSQLPhrase(DBDatabaseDriver.SQL_RENAME_COLUMN);
+            DBDatabaseDriver driver = getDatabase().getDriver();
+            String asExpr = driver.getSQLPhrase(DBDatabaseDriver.SQL_RENAME_COLUMN);
             if (asExpr!=null)
             {
                 buf.append(asExpr);
-                buf.append(alias);
+                driver.appendElementName(buf, alias);
             }
         } 
         else



Mime
View raw message