openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awh...@apache.org
Subject svn commit: r453685 - in /incubator/openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/ openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ openjpa-lib/src/test/java/org/apache/openjpa/lib/util/
Date Fri, 06 Oct 2006 17:13:21 GMT
Author: awhite
Date: Fri Oct  6 10:13:21 2006
New Revision: 453685

URL: http://svn.apache.org/viewvc?view=rev&rev=453685
Log:
Fixes from Kodo's 3.4 branch.


Modified:
    incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
    incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PostgresDictionary.java
    incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCDataGenerator.java
    incubator/openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestSimpleRegex.java

Modified: incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java?view=diff&rev=453685&r1=453684&r2=453685
==============================================================================
--- incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
(original)
+++ incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
Fri Oct  6 10:13:21 2006
@@ -119,6 +119,7 @@
     protected static final int RANGE_POST_SELECT = 0;
     protected static final int RANGE_PRE_DISTINCT = 1;
     protected static final int RANGE_POST_DISTINCT = 2;
+    protected static final int RANGE_POST_LOCK = 3;
 
     protected static final int NANO = 1;
     protected static final int MICRO = NANO * 1000;
@@ -2142,6 +2143,8 @@
             if (forUpdateClause != null)
                 buf.append(" ").append(forUpdateClause);
         }
+        if (range && rangePosition == RANGE_POST_LOCK)
+            appendSelectRange(buf, start, end);
         return buf;
     }
 

Modified: incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PostgresDictionary.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PostgresDictionary.java?view=diff&rev=453685&r1=453684&r2=453685
==============================================================================
--- incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PostgresDictionary.java
(original)
+++ incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PostgresDictionary.java
Fri Oct  6 10:13:21 2006
@@ -95,6 +95,7 @@
         maxIndexNameLength = 31;
         maxConstraintNameLength = 31;
         schemaCase = SCHEMA_CASE_LOWER;
+        rangePosition = RANGE_POST_LOCK;
         requiresAliasForSubselect = true;
         allowsAliasInBulkClause = false;
 

Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCDataGenerator.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCDataGenerator.java?view=diff&rev=453685&r1=453684&r2=453685
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCDataGenerator.java
(original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCDataGenerator.java
Fri Oct  6 10:13:21 2006
@@ -577,8 +577,8 @@
 
     private void addLoadWithFieldsMethod(BCClass bc, ClassMetaData meta) {
         Code code = addLoadMethod(bc, true);
-        // public void load(OpenJPAStateManager sm, FetchConfiguration fetch,
-        // 		BitSet fields, Object conn)
+        // public void load(OpenJPAStateManager sm, BitSet fields,
+        // 		FetchConfiguration fetch, Object conn)
         FieldMetaData[] fmds = meta.getFields();
         Collection jumps = new LinkedList();
         Collection jumps2;
@@ -621,6 +621,13 @@
                 code.invokevirtual().setMethod("loadImplData", void.class,
                     new Class[]{ OpenJPAStateManager.class, int.class });
             }
+
+            // fields.clear(i);
+            code.aload().setParam(1);
+            code.constant().setValue(i);
+            code.invokevirtual().setMethod(BitSet.class, "clear", void.class,
+                new Class[] { int.class });
+
             jumps2.add(code.go2());
 
             if (intermediate)

Modified: incubator/openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestSimpleRegex.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestSimpleRegex.java?view=diff&rev=453685&r1=453684&r2=453685
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestSimpleRegex.java
(original)
+++ incubator/openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestSimpleRegex.java
Fri Oct  6 10:13:21 2006
@@ -57,6 +57,7 @@
             "TThe .*brown.*dogg", false));
 
         assertFalse(matchExpr("Yo Hellow", ".*ello", false));
+        assertFalse(matchExpr("Hellow", ".*YoHello", false));
     }
 
     public static void main(String[] args) {



Mime
View raw message