@@ -719,33 +719,6 @@ public JSONObject parseCorrectRequest() throws Exception {
719719 }
720720
721721
722- //TODO 优化性能!
723- /**获取正确的返回结果
724- * @param method
725- * @param response
726- * @return
727- * @throws Exception
728- */
729- @ Override
730- public JSONObject parseCorrectResponse (String table , JSONObject response ) throws Exception {
731- // Log.d(TAG, "getCorrectResponse method = " + method + "; table = " + table);
732- // if (response == null || response.isEmpty()) {//避免无效空result:{}添加内容后变有效
733- // Log.e(TAG, "getCorrectResponse response == null || response.isEmpty() >> return response;");
734- return response ;
735- // }
736- //
737- // JSONObject target = apijson.JSONObject.isTableKey(table) == false
738- // ? new JSONObject() : getStructure(method, "Response", "model", table);
739- //
740- // return MethodStructure.parseResponse(method, table, target, response, new OnParseCallback() {
741- //
742- // @Override
743- // protected JSONObject onParseJSONObject(String key, JSONObject tobj, JSONObject robj) throws Exception {
744- // return getCorrectResponse(method, key, robj);
745- // }
746- // });
747- }
748-
749722 /**获取Request或Response内指定JSON结构
750723 * @param table
751724 * @param method
@@ -1075,15 +1048,22 @@ public JSONArray onArrayParse(JSONObject request, String parentPath, String name
10751048 .setJoinList (onJoinParse (join , request ));
10761049
10771050 JSONObject parent ;
1051+
1052+ long startTime = System .currentTimeMillis ();
10781053 //生成size个
10791054 for (int i = 0 ; i < (isSubquery ? 1 : size ); i ++) {
10801055 parent = onObjectParse (request , isSubquery ? parentPath : path , isSubquery ? name : "" + i , config .setType (SQLConfig .TYPE_ITEM ).setPosition (i ), isSubquery );
10811056 if (parent == null || parent .isEmpty ()) {
10821057 break ;
10831058 }
1059+
10841060 //key[]:{Table:{}}中key equals Table时 提取Table
10851061 response .add (getValue (parent , childKeys )); //null有意义
10861062 }
1063+
1064+ long endTime = System .currentTimeMillis ();
1065+ Log .e (TAG , "onArrayParse for for (int i = 0; i < (isSubquery ? 1 : size); i++) startTime = " + startTime + "; endTime = " + endTime + "; duration = " + (endTime - startTime ));
1066+
10871067 //Table>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
10881068
10891069
@@ -1665,7 +1645,7 @@ public JSONObject executeSQL(SQLConfig config, boolean isSubquery) throws Except
16651645 result = getSQLExecutor ().execute (config , false );
16661646 }
16671647
1668- return parseCorrectResponse ( config . getTable (), result ) ;
1648+ return result ;
16691649 }
16701650 catch (Exception e ) {
16711651 if (Log .DEBUG == false && e instanceof SQLException ) {
0 commit comments