@@ -139,6 +139,11 @@ public AbstractParser<T> setGlobleDatabase(String globleDatabase) {
139139 this .globleDatabase = globleDatabase ;
140140 return this ;
141141 }
142+ protected String globleSchema ;
143+ public AbstractParser <T > setGlobleSchema (String globleSchema ) {
144+ this .globleSchema = globleSchema ;
145+ return this ;
146+ }
142147 protected boolean globleFormat ;
143148 public AbstractParser <T > setGlobleFormat (Boolean globleFormat ) {
144149 this .globleFormat = globleFormat ;
@@ -273,9 +278,11 @@ public JSONObject parseResponse(JSONObject request) {
273278
274279 try {
275280 setGlobleDatabase (requestObject .getString (JSONRequest .KEY_DATABASE ));
281+ setGlobleSchema (requestObject .getString (JSONRequest .KEY_SCHEMA ));
276282 setGlobleFormat (requestObject .getBooleanValue (JSONRequest .KEY_FORMAT ));
277283
278284 requestObject .remove (JSONRequest .KEY_DATABASE );
285+ requestObject .remove (JSONRequest .KEY_SCHEMA );
279286 requestObject .remove (JSONRequest .KEY_FORMAT );
280287 } catch (Exception e ) {
281288 return extendErrorResult (requestObject , e );
@@ -335,10 +342,15 @@ public void onVerifyContent() throws Exception {
335342 */
336343 @ Override
337344 public void onVerifyRole (@ NotNull SQLConfig config ) throws Exception {
338- Log .i (TAG , "executeSQL config = " + JSON .toJSONString (config ));
345+ //居然导致 @JSONField(serialize = false) 的方法也被执行了,然后 getTablePath 里 对 sch 赋值了 Log.i(TAG, "executeSQL config = " + JSON.toJSONString(config));
339346 if (config .getDatabase () == null && globleDatabase != null ) {
340347 config .setDatabase (globleDatabase );
341348 }
349+ if (config .getSchema () == null && globleSchema != null ) {
350+ config .setSchema (globleSchema );
351+ }
352+
353+ Log .i (TAG , "executeSQL config = " + JSON .toJSONString (config ));
342354
343355 if (noVerifyRole == false ) {
344356 if (config .getRole () == null ) {
@@ -696,10 +708,10 @@ public JSONArray onArrayParse(JSONObject request, String parentPath, String name
696708 query2 = JSONRequest .QUERY_TABLE ;
697709 }
698710 else {
699- // if (isSubquery) {
700- // throw new IllegalArgumentException("子查询内不支持传 " + JSONRequest.KEY_QUERY + "!");
701- // }
702-
711+ // if (isSubquery) {
712+ // throw new IllegalArgumentException("子查询内不支持传 " + JSONRequest.KEY_QUERY + "!");
713+ // }
714+
703715 switch (query ) {
704716 case "0" :
705717 case "TABLE" :
@@ -730,7 +742,7 @@ public JSONArray onArrayParse(JSONObject request, String parentPath, String name
730742 if (count2 < 0 || count2 > max ) {
731743 throw new IllegalArgumentException (path + "/" + JSONRequest .KEY_COUNT + ":value 中 value 的值不合法!必须在 0-" + max + " 内 !" );
732744 }
733-
745+
734746 request .remove (JSONRequest .KEY_QUERY );
735747 request .remove (JSONRequest .KEY_COUNT );
736748 request .remove (JSONRequest .KEY_PAGE );
0 commit comments