@@ -1591,7 +1591,7 @@ public String gainGroupString(boolean hasPrefix) {
15911591
15921592 for (int i = 0 ; i < keys .length ; i ++) {
15931593 if (isPrepared ()) {
1594- // 不能通过 ? 来代替,因为SQLExecutor<T, JSONRequest , L> statement.setString后 GROUP BY 'userId' 有单引号,只能返回一条数据,必须去掉单引号才行!
1594+ // 不能通过 ? 来代替,因为SQLExecutor<T, M , L> statement.setString后 GROUP BY 'userId' 有单引号,只能返回一条数据,必须去掉单引号才行!
15951595 if (StringUtil .isName (keys [i ]) == false ) {
15961596 throw new IllegalArgumentException ("@group:value 中 value里面用 , 分割的每一项都必须是1个单词!并且不要有空格!" );
15971597 }
@@ -2239,7 +2239,7 @@ public String gainColumnString(boolean inSQLJoin) throws Exception {
22392239 for (String c : column ) {
22402240 if (containRaw ) {
22412241 // 由于 HashMap 对 key 做了 hash 处理,所以 get 比 containsValue 更快
2242- if ("" .equals (RAW_MAP .get (c )) || RAW_MAP .containsValue (c )) { // newSQLConfig<T, JSONRequest , L> 提前处理好的
2242+ if ("" .equals (RAW_MAP .get (c )) || RAW_MAP .containsValue (c )) { // newSQLConfig<T, M , L> 提前处理好的
22432243 //排除@raw中的值,以避免使用date_format(date,'%Y-%m-%d %H:%i:%s') 时,冒号的解析出错
22442244 //column.remove(c);
22452245 continue ;
@@ -2385,7 +2385,7 @@ public String gainColumnString(boolean inSQLJoin) throws Exception {
23852385 String expression = keys [i ]; //fun(arg0,arg1,...)
23862386
23872387 if (containRaw ) { // 由于 HashMap 对 key 做了 hash 处理,所以 get 比 containsValue 更快
2388- if ("" .equals (RAW_MAP .get (expression )) || RAW_MAP .containsValue (expression )) { // newSQLConfig<T, JSONRequest , L> 提前处理好的
2388+ if ("" .equals (RAW_MAP .get (expression )) || RAW_MAP .containsValue (expression )) { // newSQLConfig<T, M , L> 提前处理好的
23892389 continue ;
23902390 }
23912391
@@ -2394,7 +2394,7 @@ public String gainColumnString(boolean inSQLJoin) throws Exception {
23942394 String alias = expression .substring (index +1 );
23952395 boolean hasAlias = StringUtil .isName (alias );
23962396 String pre = index > 0 && hasAlias ? expression .substring (0 , index ) : expression ;
2397- if (RAW_MAP .containsValue (pre ) || "" .equals (RAW_MAP .get (pre ))) { // newSQLConfig<T, JSONRequest , L> 提前处理好的
2397+ if (RAW_MAP .containsValue (pre ) || "" .equals (RAW_MAP .get (pre ))) { // newSQLConfig<T, M , L> 提前处理好的
23982398 keys [i ] = pre + (hasAlias ? getAs () + q + alias + q : "" );
23992399 continue ;
24002400 }
@@ -2685,7 +2685,7 @@ else if ("!=null".equals(ck)) {
26852685 origin = parseArgsSplitWithSpace (mkes );
26862686 } else {
26872687 String mk = RAW_MAP .get (origin );
2688- if (mk != null ) { // newSQLConfig<T, JSONRequest , L> 提前处理好的
2688+ if (mk != null ) { // newSQLConfig<T, M , L> 提前处理好的
26892689 if (mk .length () > 0 ) {
26902690 origin = mk ;
26912691 }
@@ -2750,7 +2750,7 @@ private String parseArgsSplitWithSpace(String[] mkes) {
27502750 String origin = mkes [j ];
27512751
27522752 String mk = RAW_MAP .get (origin );
2753- if (mk != null ) { // newSQLConfig<T, JSONRequest , L> 提前处理好的
2753+ if (mk != null ) { // newSQLConfig<T, M , L> 提前处理好的
27542754 if (mk .length () > 0 ) {
27552755 mkes [j ] = mk ;
27562756 }
@@ -3612,7 +3612,7 @@ else if (c == ')') {
36123612 }
36133613 else if (StringUtil .isNotEmpty (andCond , true )) { // andCond 必须放后面,否则 prepared 值顺序错误
36143614 if (isHaving ) {
3615- // HAVING 前 WHERE 已经有条件 ? 占位,不能反过来,想优化 AND 连接在最前,需要多遍历一次内部的 key,也可以 newSQLConfig<T, JSONRequest , L> 时存到 andList
3615+ // HAVING 前 WHERE 已经有条件 ? 占位,不能反过来,想优化 AND 连接在最前,需要多遍历一次内部的 key,也可以 newSQLConfig<T, M , L> 时存到 andList
36163616 result = "( " + result + " )" + AND + andCond ;
36173617 }
36183618 else {
@@ -4463,7 +4463,7 @@ else if (isPrepared() && (c.contains("--") || PATTERN_RANGE.matcher(c).matches()
44634463 return gainCondition (logic .isNot (), condition );
44644464 }
44654465 else if (range instanceof Subquery ) {
4466- // 如果在 Parser<T, JSONRequest , L> 解析成 SQL 字符串再引用,没法保证安全性,毕竟可以再通过远程函数等方式来拼接再替代,最后引用的字符串就能注入
4466+ // 如果在 Parser<T, M , L> 解析成 SQL 字符串再引用,没法保证安全性,毕竟可以再通过远程函数等方式来拼接再替代,最后引用的字符串就能注入
44674467 return gainKey (k ) + (logic .isNot () ? NOT : "" ) + " IN " + gainSubqueryString ((Subquery ) range );
44684468 }
44694469
@@ -4919,7 +4919,7 @@ public static <T, M extends Map<String, Object>, L extends List<Object>> String
49194919
49204920 // TODO procedure 改为 List<Procedure> procedureList; behind : true; function: callFunction(); String key; ...
49214921 // for (...) { Call procedure1();\n SQL \n; Call procedure2(); ... }
4922- // 貌似不需要,因为 ObjectParser<T, JSONRequest , L> 里就已经处理的顺序等,只是这里要解决下 Schema 问题。
4922+ // 貌似不需要,因为 ObjectParser<T, M , L> 里就已经处理的顺序等,只是这里要解决下 Schema 问题。
49234923
49244924 String procedure = config .getProcedure ();
49254925 if (StringUtil .isNotEmpty (procedure , true )) {
@@ -5445,7 +5445,7 @@ public static <T, M extends Map<String, Object>, L extends List<Object>> SQLConf
54455445 RequestMethod method , String table , String alias
54465446 , M request , List <Join <T , M , L >> joinList , boolean isProcedure , Callback <T , M , L > callback ) throws Exception {
54475447 if (request == null ) { // User:{} 这种空内容在查询时也有效
5448- throw new NullPointerException (TAG + ": newSQLConfig<T, JSONRequest , L> request == null!" );
5448+ throw new NullPointerException (TAG + ": newSQLConfig<T, M , L> request == null!" );
54495449 }
54505450
54515451 Boolean explain = getBoolean (request , KEY_EXPLAIN );
@@ -5502,7 +5502,7 @@ public static <T, M extends Map<String, Object>, L extends List<Object>> SQLConf
55025502 }
55035503 }
55045504 if (newIdIn .isEmpty ()) {
5505- throw new NotExistException (TAG + ": newSQLConfig<T, JSONRequest , L> idIn instanceof List >> 去掉无效 id 后 newIdIn.isEmpty()" );
5505+ throw new NotExistException (TAG + ": newSQLConfig<T, M , L> idIn instanceof List >> 去掉无效 id 后 newIdIn.isEmpty()" );
55065506 }
55075507 idIn = newIdIn ;
55085508
@@ -5519,12 +5519,12 @@ public static <T, M extends Map<String, Object>, L extends List<Object>> SQLConf
55195519 if (id != null ) { // null 无效
55205520 if (id instanceof Number ) {
55215521 if (((Number ) id ).longValue () <= 0 ) { // 一定没有值
5522- throw new NotExistException (TAG + ": newSQLConfig<T, JSONRequest , L> " + table + ".id <= 0" );
5522+ throw new NotExistException (TAG + ": newSQLConfig<T, M , L> " + table + ".id <= 0" );
55235523 }
55245524 }
55255525 else if (id instanceof String ) {
55265526 if (StringUtil .isEmpty (id , true )) { // 一定没有值
5527- throw new NotExistException (TAG + ": newSQLConfig<T, JSONRequest , L> StringUtil.isEmpty(" + table + ".id, true)" );
5527+ throw new NotExistException (TAG + ": newSQLConfig<T, M , L> StringUtil.isEmpty(" + table + ".id, true)" );
55285528 }
55295529 }
55305530 else if (id instanceof Subquery ) {}
@@ -5542,7 +5542,7 @@ else if (id instanceof Subquery) {}
55425542 }
55435543 }
55445544 if (contains == false ) { // empty有效 BaseModel.isEmpty(idIn) == false) {
5545- throw new NotExistException (TAG + ": newSQLConfig<T, JSONRequest , L> idIn != null && (((List<?>) idIn).contains(id) == false" );
5545+ throw new NotExistException (TAG + ": newSQLConfig<T, M , L> idIn != null && (((List<?>) idIn).contains(id) == false" );
55465546 }
55475547 }
55485548
@@ -5564,7 +5564,7 @@ else if (id instanceof Subquery) {}
55645564 }
55655565 }
55665566 if (newUserIdIn .isEmpty ()) {
5567- throw new NotExistException (TAG + ": newSQLConfig<T, JSONRequest , L> userIdIn instanceof List >> 去掉无效 userId 后 newIdIn.isEmpty()" );
5567+ throw new NotExistException (TAG + ": newSQLConfig<T, M , L> userIdIn instanceof List >> 去掉无效 userId 后 newIdIn.isEmpty()" );
55685568 }
55695569 userIdIn = newUserIdIn ;
55705570 }
@@ -5573,12 +5573,12 @@ else if (id instanceof Subquery) {}
55735573 if (userId != null ) { // null 无效
55745574 if (userId instanceof Number ) {
55755575 if (((Number ) userId ).longValue () <= 0 ) { // 一定没有值
5576- throw new NotExistException (TAG + ": newSQLConfig<T, JSONRequest , L> " + table + ".userId <= 0" );
5576+ throw new NotExistException (TAG + ": newSQLConfig<T, M , L> " + table + ".userId <= 0" );
55775577 }
55785578 }
55795579 else if (userId instanceof String ) {
55805580 if (StringUtil .isEmpty (userId , true )) { // 一定没有值
5581- throw new NotExistException (TAG + ": newSQLConfig<T, JSONRequest , L> StringUtil.isEmpty(" + table + ".userId, true)" );
5581+ throw new NotExistException (TAG + ": newSQLConfig<T, M , L> StringUtil.isEmpty(" + table + ".userId, true)" );
55825582 }
55835583 }
55845584 else if (userId instanceof Subquery ) {}
@@ -5596,7 +5596,7 @@ else if (userId instanceof Subquery) {}
55965596 }
55975597 }
55985598 if (contains == false ) { // empty有效 BaseModel.isEmpty(userIdIn) == false) {
5599- throw new NotExistException (TAG + ": newSQLConfig<T, JSONRequest , L> userIdIn != null && (((List<?>) userIdIn).contains(userId) == false" );
5599+ throw new NotExistException (TAG + ": newSQLConfig<T, M , L> userIdIn != null && (((List<?>) userIdIn).contains(userId) == false" );
56005600 }
56015601 }
56025602 }
@@ -5737,7 +5737,7 @@ else if (userId instanceof Subquery) {}
57375737
57385738 if (values == null || values .length != columns .length ) {
57395739 throw new Exception ("服务器内部错误:\n " + TAG
5740- + " newSQLConfig<T, JSONRequest , L> values == null || values.length != columns.length !" );
5740+ + " newSQLConfig<T, M , L> values == null || values.length != columns.length !" );
57415741 }
57425742
57435743 column = (id == null ? "" : idKey + "," ) + (userId == null ? "" : userIdKey + "," )
@@ -5899,7 +5899,7 @@ else if (w.startsWith("!")) {
58995899
59005900 // 可重写回调方法自定义处理 // 动态设置的场景似乎很少,而且去掉后不方便用户排错!
59015901 // 去掉判断,有时候不在没关系,如果是对增删改等非开放请求强制要求传对应的条件,可以用 Operation.NECESSARY
5902- if (request .containsKey (w ) == false ) { // 和 request.get(w) == null 没区别,前面 Parser<T, JSONRequest , L> 已经过滤了 null
5902+ if (request .containsKey (w ) == false ) { // 和 request.get(w) == null 没区别,前面 Parser<T, M , L> 已经过滤了 null
59035903 // throw new IllegalArgumentException(table + ":{} 里的 @combine:value 中的value里 " + ws[i] + " 对应的 " + w + " 不在它里面!");
59045904 callback .onMissingKey4Combine (table , request , combine , ws [i ], w );
59055905 if (config instanceof AbstractSQLConfig ) {
@@ -6269,7 +6269,7 @@ public static <T, M extends Map<String, Object>, L extends List<Object>> SQLConf
62696269 boolean isQuery = RequestMethod .isQueryMethod (method );
62706270 config .setKeyPrefix (isQuery && config .isMain () == false );
62716271
6272- //TODO 解析出 SQLConfig<T, JSONRequest , L> 再合并 column, order, group 等
6272+ //TODO 解析出 SQLConfig<T, M , L> 再合并 column, order, group 等
62736273 if (joinList == null || joinList .isEmpty () || RequestMethod .isQueryMethod (method ) == false ) {
62746274 return config ;
62756275 }
@@ -6519,7 +6519,7 @@ public static interface IdCallback<T> {
65196519 }
65206520
65216521 public static interface Callback <T , M extends Map <String , Object >, L extends List <Object >> extends IdCallback <T > {
6522- /**获取 SQLConfig<T, JSONRequest , L> 的实例
6522+ /**获取 SQLConfig<T, M , L> 的实例
65236523 * @param method
65246524 * @param database
65256525 * @param schema
0 commit comments