Skip to content

Commit 9b5b32c

Browse files
committed
Server:AbstractSQLExecutor.onPutColumn新增解析JOIN结果集的优化思路
1 parent 3198998 commit 9b5b32c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

APIJSON-Java-Server/APIJSONLibrary/src/main/java/zuo/biao/apijson/server/AbstractSQLExecutor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,14 +255,15 @@ public JSONObject execute(SQLConfig config) throws Exception {
255255
* @throws Exception
256256
*/
257257
protected JSONObject onPutColumn(@NotNull SQLConfig config, @NotNull ResultSet rs, @NotNull ResultSetMetaData rsmd
258-
, int tablePosition, @NotNull JSONObject table, int columnIndex, Map<String, JSONObject> childMap) throws Exception {
258+
, final int tablePosition, @NotNull JSONObject table, final int columnIndex, Map<String, JSONObject> childMap) throws Exception {
259259

260260
if (rsmd.getColumnName(columnIndex).startsWith("_")) {
261261
Log.i(TAG, "select while (rs.next()){ ..."
262262
+ " >> rsmd.getColumnName(i).startsWith(_) >> continue;");
263263
return table;
264264
}
265265

266+
//TODO 改为 rsmd.getTableName(columnIndex) 支持副表不传 @column , 但如何判断是副表?传 mainTableMain进来
266267
String lable = rsmd.getColumnLabel(columnIndex);
267268
int dotIndex = lable.indexOf(".");
268269
String column = dotIndex < 0 ? lable : lable.substring(dotIndex + 1);

0 commit comments

Comments
 (0)