mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-14 06:45:21 +00:00
Merge branch 'unselect-lobs'
# Conflicts: # ebean-api/src/main/java/io/ebean/config/dbplatform/db2/DB2Platform.java # ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanProperty.java # ebean-core/src/main/java/io/ebeaninternal/server/query/STreeProperty.java # ebean-core/src/main/java/io/ebeaninternal/server/query/SqlTreeNode.java # ebean-test/src/test/java/io/ebeaninternal/server/idgen/TestUuidGenerator.java # ebean-test/src/test/java/org/tests/json/TestJsonMapBasic.java
This commit is contained in:
commit
fc1ae308b5
5 files changed
+64
-37
No files matched your search
@@ -1160,9 +1160,25 @@ public class BeanProperty implements ElPropertyValue, Property, STreeProperty {
|
||||
public boolean isLob() {
|
||||
return lob;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if this <code>isLob()</code> or the type will effectively map to a lob.
|
||||
*/
|
||||
@Override
|
||||
public boolean isDbLob() {
|
||||
return lob || dbType == DbPlatformType.JSON && dbLength == 0;
|
||||
if (lob) {
|
||||
return true;
|
||||
}
|
||||
switch (dbType) {
|
||||
case DbPlatformType.JSON:
|
||||
case DbPlatformType.JSONB:
|
||||
return dbLength == 0; // must be analog to DbPlatformTypeMapping.lookup
|
||||
case DbPlatformType.JSONBlob:
|
||||
case DbPlatformType.JSONClob:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isLobType(int type) {
|
||||
|
||||
@@ -30,7 +30,7 @@ public interface STreeProperty extends ScalarDataReader<Object> {
|
||||
boolean isId();
|
||||
|
||||
/**
|
||||
* Returns true, if this is a lob property.
|
||||
* Returns true, if this is a lob property from db-perspective.
|
||||
*/
|
||||
boolean isDbLob();
|
||||
|
||||
|
||||
@@ -78,6 +78,10 @@ interface SqlTreeNode {
|
||||
* Create the loader for this node.
|
||||
*/
|
||||
SqlTreeLoad createLoad();
|
||||
|
||||
default void unselectLobs() {};
|
||||
|
||||
/**
|
||||
* Unselect lobs (for distinct queries on DB2 and Oracle).
|
||||
*/
|
||||
default void unselectLobs() {
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user