mirror of https://github.com/apache/openjpa.git
Fixes from Kodo's 3.4 branch.
git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@453685 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c0c4c3c738
commit
dc09b61954
|
@ -119,6 +119,7 @@ public class DBDictionary
|
||||||
protected static final int RANGE_POST_SELECT = 0;
|
protected static final int RANGE_POST_SELECT = 0;
|
||||||
protected static final int RANGE_PRE_DISTINCT = 1;
|
protected static final int RANGE_PRE_DISTINCT = 1;
|
||||||
protected static final int RANGE_POST_DISTINCT = 2;
|
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 NANO = 1;
|
||||||
protected static final int MICRO = NANO * 1000;
|
protected static final int MICRO = NANO * 1000;
|
||||||
|
@ -2142,6 +2143,8 @@ public class DBDictionary
|
||||||
if (forUpdateClause != null)
|
if (forUpdateClause != null)
|
||||||
buf.append(" ").append(forUpdateClause);
|
buf.append(" ").append(forUpdateClause);
|
||||||
}
|
}
|
||||||
|
if (range && rangePosition == RANGE_POST_LOCK)
|
||||||
|
appendSelectRange(buf, start, end);
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -95,6 +95,7 @@ public class PostgresDictionary
|
||||||
maxIndexNameLength = 31;
|
maxIndexNameLength = 31;
|
||||||
maxConstraintNameLength = 31;
|
maxConstraintNameLength = 31;
|
||||||
schemaCase = SCHEMA_CASE_LOWER;
|
schemaCase = SCHEMA_CASE_LOWER;
|
||||||
|
rangePosition = RANGE_POST_LOCK;
|
||||||
requiresAliasForSubselect = true;
|
requiresAliasForSubselect = true;
|
||||||
allowsAliasInBulkClause = false;
|
allowsAliasInBulkClause = false;
|
||||||
|
|
||||||
|
|
|
@ -577,8 +577,8 @@ public class PCDataGenerator
|
||||||
|
|
||||||
private void addLoadWithFieldsMethod(BCClass bc, ClassMetaData meta) {
|
private void addLoadWithFieldsMethod(BCClass bc, ClassMetaData meta) {
|
||||||
Code code = addLoadMethod(bc, true);
|
Code code = addLoadMethod(bc, true);
|
||||||
// public void load(OpenJPAStateManager sm, FetchConfiguration fetch,
|
// public void load(OpenJPAStateManager sm, BitSet fields,
|
||||||
// BitSet fields, Object conn)
|
// FetchConfiguration fetch, Object conn)
|
||||||
FieldMetaData[] fmds = meta.getFields();
|
FieldMetaData[] fmds = meta.getFields();
|
||||||
Collection jumps = new LinkedList();
|
Collection jumps = new LinkedList();
|
||||||
Collection jumps2;
|
Collection jumps2;
|
||||||
|
@ -621,6 +621,13 @@ public class PCDataGenerator
|
||||||
code.invokevirtual().setMethod("loadImplData", void.class,
|
code.invokevirtual().setMethod("loadImplData", void.class,
|
||||||
new Class[]{ OpenJPAStateManager.class, int.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());
|
jumps2.add(code.go2());
|
||||||
|
|
||||||
if (intermediate)
|
if (intermediate)
|
||||||
|
|
|
@ -57,6 +57,7 @@ public class TestSimpleRegex extends TestCase {
|
||||||
"TThe .*brown.*dogg", false));
|
"TThe .*brown.*dogg", false));
|
||||||
|
|
||||||
assertFalse(matchExpr("Yo Hellow", ".*ello", false));
|
assertFalse(matchExpr("Yo Hellow", ".*ello", false));
|
||||||
|
assertFalse(matchExpr("Hellow", ".*YoHello", false));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
Loading…
Reference in New Issue