empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rei...@apache.org
Subject svn commit: r691281 - /incubator/empire-db/trunk/core/Empire-db/src/org/apache/empire/db/hsql/DBDatabaseDriverHSql.java
Date Tue, 02 Sep 2008 15:45:03 GMT
Author: reiher
Date: Tue Sep  2 08:45:03 2008
New Revision: 691281

URL: http://svn.apache.org/viewvc?rev=691281&view=rev
Log:
JIRA EMPIREDB-6 quick fix for quoting "COUNT" column names.

Modified:
    incubator/empire-db/trunk/core/Empire-db/src/org/apache/empire/db/hsql/DBDatabaseDriverHSql.java

Modified: incubator/empire-db/trunk/core/Empire-db/src/org/apache/empire/db/hsql/DBDatabaseDriverHSql.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/core/Empire-db/src/org/apache/empire/db/hsql/DBDatabaseDriverHSql.java?rev=691281&r1=691280&r2=691281&view=diff
==============================================================================
--- incubator/empire-db/trunk/core/Empire-db/src/org/apache/empire/db/hsql/DBDatabaseDriverHSql.java
(original)
+++ incubator/empire-db/trunk/core/Empire-db/src/org/apache/empire/db/hsql/DBDatabaseDriverHSql.java
Tue Sep  2 08:45:03 2008
@@ -695,6 +695,17 @@
     }
     
     /**
+     * Checks wether a table or column name needs to be quoted or not<BR/>
+     * By default names containing a "-", "+" or " " require quoting.<BR/>
+     * Overrides this function to add database specific keywords like "user" or "count" 

+     */
+    @Override
+    protected boolean quoteElementName(String name)
+    {
+        return (name.toUpperCase().equals("COUNT") || super.quoteElementName(name));
+    }
+
+    /**
      * Returns true if the object has been dropped successfully.
      * 
      * @return true if the object has been dropped successfully
@@ -711,7 +722,6 @@
         appendElementName(sql, name);
         // Done
         return script.addStmt(sql);
-    }
-
+    }    
 }
 



Mime
View raw message