openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p..@apache.org
Subject svn commit: r612523 - in /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql: DBDictionary.java HSQLDictionary.java
Date Wed, 16 Jan 2008 17:25:54 GMT
Author: pcl
Date: Wed Jan 16 09:25:47 2008
New Revision: 612523

URL: http://svn.apache.org/viewvc?rev=612523&view=rev
Log:
OPENJPA-488. HSQL override is no longer necessary; correct if clause in DBDictionary.

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/HSQLDictionary.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java?rev=612523&r1=612522&r2=612523&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
Wed Jan 16 09:25:47 2008
@@ -2498,7 +2498,7 @@
         buf.append(substringFunctionName).append("(");
         str.appendTo(buf);
         buf.append(", ");
-        if (start instanceof Number) {
+        if (start.getValue() instanceof Number) {
             long startLong = toLong(start);
             buf.append(Long.toString(startLong + 1));
         } else {

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/HSQLDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/HSQLDictionary.java?rev=612523&r1=612522&r2=612523&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/HSQLDictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/HSQLDictionary.java
Wed Jan 16 09:25:47 2008
@@ -260,23 +260,6 @@
             buf.append(String.valueOf(end - start));
     }
 
-    public void substring(SQLBuffer buf, FilterValue str, FilterValue start,
-        FilterValue end) {
-        buf.append(substringFunctionName).append("((");
-        str.appendTo(buf);
-        buf.append("), (");
-        start.appendTo(buf);
-        buf.append(" + 1)");
-        if (end != null) {
-            buf.append(", (");
-            appendNumericCast(buf, end);
-            buf.append(" - (");
-            appendNumericCast(buf, start);
-            buf.append("))");
-        }
-        buf.append(")");
-    }
-
     public void indexOf(SQLBuffer buf, FilterValue str, FilterValue find,
         FilterValue start) {
         buf.append("(LOCATE(");



Mime
View raw message