Skip to content

Commit 9a45d33

Browse files
committed
QuestDB: 解决 JOIN 返回主表空对象并未返回副表,解决 QuestDB 自动把副表 id 等与主表重名字段改成 id1 导致的解析问题
1 parent d8b8e57 commit 9a45d33

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

APIJSONORM/src/main/java/apijson/orm/AbstractSQLExecutor.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -940,6 +940,8 @@ protected void executeAppJoin(SQLConfig<T> config, List<JSONObject> resultList,
940940
count ++;
941941
Log.d(TAG, ">>> executeAppJoin childMap.put('" + cacheSql + "', result); childMap.size() = " + childMap.size());
942942
}
943+
}
944+
}
943945
finally {
944946
if (rs != null) {
945947
try {
@@ -1101,7 +1103,7 @@ else if (value instanceof Month) {
11011103
else if (value instanceof DayOfWeek) {
11021104
value = ((DayOfWeek) value).getValue();
11031105
}
1104-
else if (value instanceof String && isJSONType(config, rsmd, columnIndex, lable)) { //json String
1106+
else if (value instanceof String && isJSONType(config, rsmd, columnIndex, label)) { //json String
11051107
castToJson = true;
11061108
}
11071109
else if (value instanceof Blob) { //FIXME 存的是 abcde,取出来直接就是 [97, 98, 99, 100, 101] 这种 byte[] 类型,没有经过以下处理,但最终序列化后又变成了字符串 YWJjZGU=
@@ -1130,7 +1132,7 @@ else if (value instanceof Clob) { //SQL Server TEXT 类型 居然走这个
11301132

11311133
if (castToJson == false) {
11321134
List<String> json = config.getJson();
1133-
castToJson = json != null && json.contains(lable);
1135+
castToJson = json != null && json.contains(label);
11341136
castToJson = json != null && json.contains(label);
11351137
}
11361138
if (castToJson) {

0 commit comments

Comments
 (0)