001/*
002 *  Copyright (c) 2022-2025, Mybatis-Flex (fuhai999@gmail.com).
003 *  <p>
004 *  Licensed under the Apache License, Version 2.0 (the "License");
005 *  you may not use this file except in compliance with the License.
006 *  You may obtain a copy of the License at
007 *  <p>
008 *  http://www.apache.org/licenses/LICENSE-2.0
009 *  <p>
010 *  Unless required by applicable law or agreed to in writing, software
011 *  distributed under the License is distributed on an "AS IS" BASIS,
012 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 *  See the License for the specific language governing permissions and
014 *  limitations under the License.
015 */
016package com.mybatisflex.core.query;
017
018import com.mybatisflex.core.constant.SqlConnector;
019import com.mybatisflex.core.util.LambdaGetter;
020import com.mybatisflex.core.util.LambdaUtil;
021
022import java.util.Collection;
023import java.util.Map;
024import java.util.function.BooleanSupplier;
025import java.util.function.Consumer;
026import java.util.function.Predicate;
027
028/**
029 * {@link QueryWrapper} 泛型适配器。
030 *
031 * @param <R> 返回值类型
032 * @author michael
033 * @author suomm
034 */
035@SuppressWarnings({"unchecked", "rawtypes"})
036public class QueryWrapperAdapter<R extends QueryWrapperAdapter<R>> extends QueryWrapper {
037
038    @Override
039    public WithBuilder<R> with(String name) {
040        return super.with(name);
041    }
042
043    @Override
044    public WithBuilder<R> with(String name, String... params) {
045        return super.with(name, params);
046    }
047
048    @Override
049    public WithBuilder<R> withRecursive(String name) {
050        return super.withRecursive(name);
051    }
052
053    @Override
054    public WithBuilder<R> withRecursive(String name, String... params) {
055        return super.withRecursive(name, params);
056    }
057
058    @Override
059    public R select() {
060        super.select();
061        return (R) this;
062    }
063
064    @Override
065    public R select(String... columns) {
066        super.select(columns);
067        return (R) this;
068    }
069
070    @Override
071    public <T> R select(LambdaGetter<T>... lambdaGetters) {
072        super.select(lambdaGetters);
073        return (R) this;
074    }
075
076    @Override
077    public R select(QueryColumn... queryColumns) {
078        super.select(queryColumns);
079        return (R) this;
080    }
081
082    @Override
083    public R select(Iterable<QueryColumn> queryColumns) {
084        super.select(queryColumns);
085        return (R) this;
086    }
087
088    @Override
089    public R select(QueryColumn[]... queryColumns) {
090        super.select(queryColumns);
091        return (R) this;
092    }
093
094    @Override
095    public R select(QueryColumn[] queryColumns, QueryColumn... queryColumns2) {
096        super.select(queryColumns, queryColumns2);
097        return (R) this;
098    }
099
100    public R from(Class<?>... entityClasses) {
101        super.from(entityClasses);
102        return (R) this;
103    }
104
105    @Override
106    public R from(String... tables) {
107        super.from(tables);
108        return (R) this;
109    }
110
111    @Override
112    public R from(QueryTable... tables) {
113        super.from(tables);
114        return (R) this;
115    }
116
117    @Override
118    public R from(QueryWrapper queryWrapper) {
119        super.from(queryWrapper);
120        return (R) this;
121    }
122
123    @Override
124    public R as(String alias) {
125        super.as(alias);
126        return (R) this;
127    }
128
129    @Override
130    public R where(QueryCondition queryCondition) {
131        super.where(queryCondition);
132        return (R) this;
133    }
134
135    @Override
136    public R where(String sql) {
137        super.where(sql);
138        return (R) this;
139    }
140
141    @Override
142    public R where(String sql, Object... params) {
143        super.where(sql, params);
144        return (R) this;
145    }
146
147    @Override
148    public R where(Map<String, Object> whereConditions) {
149        super.where(whereConditions);
150        return (R) this;
151    }
152
153    @Override
154    public R where(Map<String, Object> whereConditions, SqlOperators operators) {
155        super.where(whereConditions, operators);
156        return (R) this;
157    }
158
159    @Override
160    public <T> QueryConditionBuilder<R> where(LambdaGetter<T> fn) {
161        return new QueryConditionBuilder<>((R) this, LambdaUtil.getQueryColumn(fn), SqlConnector.AND);
162    }
163
164    @Override
165    public R where(Consumer<QueryWrapper> consumer) {
166        return and(consumer);
167    }
168
169    @Override
170    public R and(QueryCondition queryCondition) {
171        super.and(queryCondition);
172        return (R) this;
173    }
174
175    @Override
176    public R and(String sql) {
177        super.and(sql);
178        return (R) this;
179    }
180
181    @Override
182    public R and(String sql, Object... params) {
183        super.and(sql, params);
184        return (R) this;
185    }
186
187    @Override
188    public <T> QueryConditionBuilder<R> and(LambdaGetter<T> fn) {
189        return new QueryConditionBuilder<>((R) this, LambdaUtil.getQueryColumn(fn), SqlConnector.AND);
190    }
191
192    @Override
193    public R and(Consumer<QueryWrapper> consumer) {
194        super.and(consumer);
195        return (R) this;
196    }
197
198    @Override
199    public R and(Map<String, Object> whereConditions) {
200        super.and(whereConditions);
201        return (R) this;
202    }
203
204    @Override
205    public R and(Map<String, Object> whereConditions, SqlOperators operators) {
206        super.and(whereConditions, operators);
207        return (R) this;
208    }
209
210    @Override
211    public R and(Map<String, Object> whereConditions, SqlOperators operators, SqlConnector innerConnector) {
212        super.and(whereConditions, operators, innerConnector);
213        return (R) this;
214    }
215
216    @Override
217    public R or(QueryCondition queryCondition) {
218        super.or(queryCondition);
219        return (R) this;
220    }
221
222    @Override
223    public R or(String sql) {
224        super.or(sql);
225        return (R) this;
226    }
227
228    @Override
229    public R or(String sql, Object... params) {
230        super.or(sql, params);
231        return (R) this;
232    }
233
234    @Override
235    public <T> QueryConditionBuilder<R> or(LambdaGetter<T> fn) {
236        return new QueryConditionBuilder<>((R) this, LambdaUtil.getQueryColumn(fn), SqlConnector.OR);
237    }
238
239    @Override
240    public R or(Consumer<QueryWrapper> consumer) {
241        super.or(consumer);
242        return (R) this;
243    }
244
245    @Override
246    public R or(Map<String, Object> whereConditions) {
247        super.or(whereConditions);
248        return (R) this;
249    }
250
251    @Override
252    public R or(Map<String, Object> whereConditions, SqlOperators operators) {
253        super.or(whereConditions, operators);
254        return (R) this;
255    }
256
257    @Override
258    public R or(Map<String, Object> whereConditions, SqlOperators operators, SqlConnector innerConnector) {
259        super.or(whereConditions, operators, innerConnector);
260        return (R) this;
261    }
262
263    @Override
264    public Joiner<R> leftJoin(QueryTable table) {
265        return super.leftJoin(table);
266    }
267
268    @Override
269    public Joiner<R> leftJoin(String table) {
270        return super.leftJoin(table);
271    }
272
273    @Override
274    public Joiner<R> leftJoin(String table, boolean when) {
275        return super.leftJoin(table, when);
276    }
277
278    @Override
279    public Joiner<R> leftJoin(Class entityClass) {
280        return super.leftJoin(entityClass);
281    }
282
283    @Override
284    public Joiner<R> leftJoin(Class entityClass, boolean when) {
285        return super.leftJoin(entityClass, when);
286    }
287
288    @Override
289    public Joiner<R> leftJoin(QueryWrapper table) {
290        return super.leftJoin(table);
291    }
292
293    @Override
294    public Joiner<R> leftJoin(QueryWrapper table, boolean when) {
295        return super.leftJoin(table, when);
296    }
297
298    @Override
299    public Joiner<R> rightJoin(QueryTable table) {
300        return super.rightJoin(table);
301    }
302
303    @Override
304    public Joiner<R> rightJoin(String table) {
305        return super.rightJoin(table);
306    }
307
308    @Override
309    public Joiner<R> rightJoin(String table, boolean when) {
310        return super.rightJoin(table, when);
311    }
312
313    @Override
314    public Joiner<R> rightJoin(Class entityClass) {
315        return super.rightJoin(entityClass);
316    }
317
318    @Override
319    public Joiner<R> rightJoin(Class entityClass, boolean when) {
320        return super.rightJoin(entityClass, when);
321    }
322
323    @Override
324    public Joiner<R> rightJoin(QueryWrapper table) {
325        return super.rightJoin(table);
326    }
327
328    @Override
329    public Joiner<R> rightJoin(QueryWrapper table, boolean when) {
330        return super.rightJoin(table, when);
331    }
332
333    @Override
334    public Joiner<R> innerJoin(QueryTable table) {
335        return super.innerJoin(table);
336    }
337
338    @Override
339    public Joiner<R> innerJoin(String table) {
340        return super.innerJoin(table);
341    }
342
343    @Override
344    public Joiner<R> innerJoin(String table, boolean when) {
345        return super.innerJoin(table, when);
346    }
347
348    @Override
349    public Joiner<R> innerJoin(Class entityClass) {
350        return super.innerJoin(entityClass);
351    }
352
353    @Override
354    public Joiner<R> innerJoin(Class entityClass, boolean when) {
355        return super.innerJoin(entityClass, when);
356    }
357
358    @Override
359    public Joiner<R> innerJoin(QueryWrapper table) {
360        return super.innerJoin(table);
361    }
362
363    @Override
364    public Joiner<R> innerJoin(QueryWrapper table, boolean when) {
365        return super.innerJoin(table, when);
366    }
367
368    @Override
369    public Joiner<R> fullJoin(QueryTable table) {
370        return super.fullJoin(table);
371    }
372
373    @Override
374    public Joiner<R> fullJoin(String table) {
375        return super.fullJoin(table);
376    }
377
378    @Override
379    public Joiner<R> fullJoin(String table, boolean when) {
380        return super.fullJoin(table, when);
381    }
382
383    @Override
384    public Joiner<R> fullJoin(Class entityClass) {
385        return super.fullJoin(entityClass);
386    }
387
388    @Override
389    public Joiner<R> fullJoin(Class entityClass, boolean when) {
390        return super.fullJoin(entityClass, when);
391    }
392
393    @Override
394    public Joiner<R> fullJoin(QueryWrapper table) {
395        return super.fullJoin(table);
396    }
397
398    @Override
399    public Joiner<R> fullJoin(QueryWrapper table, boolean when) {
400        return super.fullJoin(table, when);
401    }
402
403    @Override
404    public Joiner<R> crossJoin(QueryTable table) {
405        return super.crossJoin(table);
406    }
407
408    @Override
409    public Joiner<R> crossJoin(String table) {
410        return super.crossJoin(table);
411    }
412
413    @Override
414    public Joiner<R> crossJoin(String table, boolean when) {
415        return super.crossJoin(table, when);
416    }
417
418    @Override
419    public Joiner<R> crossJoin(Class entityClass) {
420        return super.crossJoin(entityClass);
421    }
422
423    @Override
424    public Joiner<R> crossJoin(Class entityClass, boolean when) {
425        return super.crossJoin(entityClass, when);
426    }
427
428    @Override
429    public Joiner<R> crossJoin(QueryWrapper table) {
430        return super.crossJoin(table);
431    }
432
433    @Override
434    public Joiner<R> crossJoin(QueryWrapper table, boolean when) {
435        return super.crossJoin(table, when);
436    }
437
438    @Override
439    public Joiner<R> join(QueryTable table) {
440        return super.join(table);
441    }
442
443    @Override
444    public Joiner<R> join(String table) {
445        return super.join(table);
446    }
447
448    @Override
449    public Joiner<R> join(String table, boolean when) {
450        return super.join(table, when);
451    }
452
453    @Override
454    public Joiner<R> join(Class entityClass) {
455        return super.join(entityClass);
456    }
457
458    @Override
459    public Joiner<R> join(Class entityClass, boolean when) {
460        return super.join(entityClass, when);
461    }
462
463    @Override
464    public Joiner<R> join(QueryWrapper table) {
465        return super.join(table);
466    }
467
468    @Override
469    public Joiner<R> join(QueryWrapper table, boolean when) {
470        return super.join(table, when);
471    }
472
473    @Override
474    public R union(QueryWrapper unionQuery) {
475        super.union(unionQuery);
476        return (R) this;
477    }
478
479    @Override
480    public R unionAll(QueryWrapper unionQuery) {
481        super.unionAll(unionQuery);
482        return (R) this;
483    }
484
485    @Override
486    public R forUpdate() {
487        super.forUpdate();
488        return (R) this;
489    }
490
491    @Override
492    public R forUpdateNoWait() {
493        super.forUpdateNoWait();
494        return (R) this;
495    }
496
497    @Override
498    public R groupBy(String name) {
499        super.groupBy(name);
500        return (R) this;
501    }
502
503    @Override
504    public R groupBy(String... names) {
505        super.groupBy(names);
506        return (R) this;
507    }
508
509    @Override
510    public R groupBy(QueryColumn column) {
511        super.groupBy(column);
512        return (R) this;
513    }
514
515    @Override
516    public R groupBy(QueryColumn... columns) {
517        super.groupBy(columns);
518        return (R) this;
519    }
520
521    @Override
522    public <T> R groupBy(LambdaGetter<T> column) {
523        super.groupBy(column);
524        return (R) this;
525    }
526
527    @Override
528    public <T> R groupBy(LambdaGetter<T>... columns) {
529        super.groupBy(columns);
530        return (R) this;
531    }
532
533    @Override
534    public R having(QueryCondition queryCondition) {
535        super.having(queryCondition);
536        return (R) this;
537    }
538
539    @Override
540    public R orderBy(QueryColumn column, Boolean asc) {
541        super.orderBy(column, asc);
542        return (R) this;
543    }
544
545    @Override
546    public R orderBy(QueryOrderBy... orderBys) {
547        super.orderBy(orderBys);
548        return (R) this;
549    }
550
551    @Override
552    public <T> R orderBy(LambdaGetter<T> column, Boolean asc) {
553        super.orderBy(column, asc);
554        return (R) this;
555    }
556
557    @Override
558    public <T> QueryOrderByBuilder<R> orderBy(LambdaGetter<T> getter) {
559        return (QueryOrderByBuilder<R>) super.orderBy(getter);
560    }
561
562    @Override
563    public R orderBy(String column, Boolean asc) {
564        super.orderBy(column, asc);
565        return (R) this;
566    }
567
568    @Override
569    public R orderBy(String... orderBys) {
570        super.orderBy(orderBys);
571        return (R) this;
572    }
573
574    @Override
575    public R limit(Number rows) {
576        super.limit(rows);
577        return (R) this;
578    }
579
580    @Override
581    public R offset(Number offset) {
582        super.offset(offset);
583        return (R) this;
584    }
585
586    @Override
587    public R limit(Number offset, Number rows) {
588        super.limit(offset, rows);
589        return (R) this;
590    }
591
592    @Override
593    public R datasource(String datasource) {
594        super.datasource(datasource);
595        return (R) this;
596    }
597
598    @Override
599    public R hint(String hint) {
600        super.hint(hint);
601        return (R) this;
602    }
603
604
605    /////////MyBatis-Plus 兼容方法///////////////
606
607    /**
608     * 等于 {@code =}
609     *
610     * @param column 列名
611     * @param value  条件的值
612     */
613    @Override
614    public R eq(String column, Object value) {
615        and(QueryMethods.column(column).eq(value));
616        return (R) this;
617    }
618
619    /**
620     * 等于 {@code =}
621     *
622     * @param column 列名, lambda 展示
623     * @param value  值
624     */
625    @Override
626    public <T> R eq(LambdaGetter<T> column, Object value) {
627        and(QueryMethods.column(column).eq(value));
628        return (R) this;
629    }
630
631    /**
632     * 等于 {@code =}
633     *
634     * @param column      列名
635     * @param value       条件的值
636     * @param isEffective 是否有效
637     */
638    @Override
639    public R eq(String column, Object value, boolean isEffective) {
640        if (isEffective) {
641            and(QueryMethods.column(column).eq_(value));
642        }
643        return (R) this;
644    }
645
646    /**
647     * 等于 {@code =}
648     *
649     * @param column      列名, lambda 展示
650     * @param value       值
651     * @param isEffective 是否有效
652     */
653    @Override
654    public <T> R eq(LambdaGetter<T> column, Object value, boolean isEffective) {
655        if (isEffective) {
656            and(QueryMethods.column(column).eq_(value));
657        }
658        return (R) this;
659    }
660
661    /**
662     * 等于 {@code =}
663     *
664     * @param column      列名
665     * @param value       条件的值
666     * @param isEffective 是否有效
667     */
668    @Override
669    public <V> R eq(String column, V value, Predicate<V> isEffective) {
670        if (isEffective.test(value)) {
671            and(QueryMethods.column(column).eq_(value));
672        }
673        return (R) this;
674    }
675
676    /**
677     * 等于 {@code =}
678     *
679     * @param column      列名, lambda 展示
680     * @param value       值
681     * @param isEffective 是否有效
682     */
683    @Override
684    public <T, V> R eq(LambdaGetter<T> column, V value, Predicate<V> isEffective) {
685        if (isEffective.test(value)) {
686            and(QueryMethods.column(column).eq_(value));
687        }
688        return (R) this;
689    }
690
691
692    /**
693     * 不等于 {@code !=}
694     *
695     * @param column 列名
696     * @param value  条件的值
697     */
698    @Override
699    public R ne(String column, Object value) {
700        and(QueryMethods.column(column).ne(value));
701        return (R) this;
702    }
703
704    /**
705     * 不等于 {@code !=}
706     *
707     * @param column 列名, lambda 展示
708     * @param value  值
709     */
710    @Override
711    public <T> R ne(LambdaGetter<T> column, Object value) {
712        and(QueryMethods.column(column).ne(value));
713        return (R) this;
714    }
715
716    /**
717     * 不等于 {@code !=}
718     *
719     * @param column      列名
720     * @param value       条件的值
721     * @param isEffective 是否有效
722     */
723    @Override
724    public R ne(String column, Object value, boolean isEffective) {
725        if (isEffective) {
726            and(QueryMethods.column(column).ne_(value));
727        }
728        return (R) this;
729    }
730
731    /**
732     * 不等于 {@code !=}
733     *
734     * @param column      列名, lambda 展示
735     * @param value       值
736     * @param isEffective 是否有效
737     */
738    @Override
739    public <T> R ne(LambdaGetter<T> column, Object value, boolean isEffective) {
740        if (isEffective) {
741            and(QueryMethods.column(column).ne_(value));
742        }
743        return (R) this;
744    }
745
746    /**
747     * 不等于 {@code !=}
748     *
749     * @param column      列名
750     * @param value       条件的值
751     * @param isEffective 是否有效
752     */
753    @Override
754    public <V> R ne(String column, V value, Predicate<V> isEffective) {
755        if (isEffective.test(value)) {
756            and(QueryMethods.column(column).ne_(value));
757        }
758        return (R) this;
759    }
760
761    /**
762     * 不等于 {@code !=}
763     *
764     * @param column      列名, lambda 展示
765     * @param value       值
766     * @param isEffective 是否有效
767     */
768    @Override
769    public <T, V> R ne(LambdaGetter<T> column, V value, Predicate<V> isEffective) {
770        if (isEffective.test(value)) {
771            and(QueryMethods.column(column).ne_(value));
772        }
773        return (R) this;
774    }
775
776
777    /**
778     * 大于 {@code >}
779     *
780     * @param column 列名
781     * @param value  条件的值
782     */
783    @Override
784    public R gt(String column, Object value) {
785        and(QueryMethods.column(column).gt(value));
786        return (R) this;
787    }
788
789    /**
790     * 大于 {@code >}
791     *
792     * @param column 列名, lambda 展示
793     * @param value  值
794     */
795    @Override
796    public <T> R gt(LambdaGetter<T> column, Object value) {
797        and(QueryMethods.column(column).gt(value));
798        return (R) this;
799    }
800
801    /**
802     * 大于 {@code >}
803     *
804     * @param column      列名
805     * @param value       条件的值
806     * @param isEffective 是否有效
807     */
808    @Override
809    public R gt(String column, Object value, boolean isEffective) {
810        if (isEffective) {
811            and(QueryMethods.column(column).gt_(value));
812        }
813        return (R) this;
814    }
815
816    /**
817     * 大于 {@code >}
818     *
819     * @param column      列名, lambda 展示
820     * @param value       值
821     * @param isEffective 是否有效
822     */
823    @Override
824    public <T> R gt(LambdaGetter<T> column, Object value, boolean isEffective) {
825        if (isEffective) {
826            and(QueryMethods.column(column).gt_(value));
827        }
828        return (R) this;
829    }
830
831    /**
832     * 大于 {@code >}
833     *
834     * @param column      列名
835     * @param value       条件的值
836     * @param isEffective 是否有效
837     */
838    @Override
839    public <V> R gt(String column, V value, Predicate<V> isEffective) {
840        if (isEffective.test(value)) {
841            and(QueryMethods.column(column).gt_(value));
842        }
843        return (R) this;
844    }
845
846    /**
847     * 大于 {@code >}
848     *
849     * @param column      列名, lambda 展示
850     * @param value       值
851     * @param isEffective 是否有效
852     */
853    @Override
854    public <T, V> R gt(LambdaGetter<T> column, V value, Predicate<V> isEffective) {
855        if (isEffective.test(value)) {
856            and(QueryMethods.column(column).gt_(value));
857        }
858        return (R) this;
859    }
860
861
862    /**
863     * 大于等于 {@code >=}
864     *
865     * @param column 列名
866     * @param value  条件的值
867     */
868    @Override
869    public R ge(String column, Object value) {
870        and(QueryMethods.column(column).ge_(value));
871        return (R) this;
872    }
873
874    /**
875     * 大于等于 {@code >=}
876     *
877     * @param column 列名, lambda 展示
878     * @param value  值
879     */
880    @Override
881    public <T> R ge(LambdaGetter<T> column, Object value) {
882        and(QueryMethods.column(column).ge_(value));
883        return (R) this;
884    }
885
886    /**
887     * 大于等于 {@code >=}
888     *
889     * @param column      列名
890     * @param value       条件的值
891     * @param isEffective 是否有效
892     */
893    @Override
894    public R ge(String column, Object value, boolean isEffective) {
895        if (isEffective) {
896            and(QueryMethods.column(column).ge_(value));
897        }
898        return (R) this;
899    }
900
901    /**
902     * 大于等于 {@code >=}
903     *
904     * @param column      列名, lambda 展示
905     * @param value       值
906     * @param isEffective 是否有效
907     */
908    @Override
909    public <T> R ge(LambdaGetter<T> column, Object value, boolean isEffective) {
910        if (isEffective) {
911            and(QueryMethods.column(column).ge_(value));
912        }
913        return (R) this;
914    }
915
916    /**
917     * 大于等于 {@code >=}
918     *
919     * @param column      列名
920     * @param value       条件的值
921     * @param isEffective 是否有效
922     */
923    @Override
924    public <V> R ge(String column, V value, Predicate<V> isEffective) {
925        if (isEffective.test(value)) {
926            and(QueryMethods.column(column).ge_(value));
927        }
928        return (R) this;
929    }
930
931    /**
932     * 大于等于 {@code >=}
933     *
934     * @param column      列名, lambda 展示
935     * @param value       值
936     * @param isEffective 是否有效
937     */
938    @Override
939    public <T, V> R ge(LambdaGetter<T> column, V value, Predicate<V> isEffective) {
940        if (isEffective.test(value)) {
941            and(QueryMethods.column(column).ge_(value));
942        }
943        return (R) this;
944    }
945
946
947    /**
948     * 小于 {@code <}
949     *
950     * @param column 列名
951     * @param value  条件的值
952     */
953    @Override
954    public R lt(String column, Object value) {
955        and(QueryMethods.column(column).lt(value));
956        return (R) this;
957    }
958
959    /**
960     * 小于 {@code <}
961     *
962     * @param column 列名, lambda 展示
963     * @param value  值
964     */
965    @Override
966    public <T> R lt(LambdaGetter<T> column, Object value) {
967        and(QueryMethods.column(column).lt(value));
968        return (R) this;
969    }
970
971    /**
972     * 小于 {@code <}
973     *
974     * @param column      列名
975     * @param value       条件的值
976     * @param isEffective 是否有效
977     */
978    @Override
979    public R lt(String column, Object value, boolean isEffective) {
980        if (isEffective) {
981            and(QueryMethods.column(column).lt_(value));
982        }
983        return (R) this;
984    }
985
986    /**
987     * 小于 {@code <}
988     *
989     * @param column      列名, lambda 展示
990     * @param value       值
991     * @param isEffective 是否有效
992     */
993    @Override
994    public <T> R lt(LambdaGetter<T> column, Object value, boolean isEffective) {
995        if (isEffective) {
996            and(QueryMethods.column(column).lt_(value));
997        }
998        return (R) this;
999    }
1000
1001    /**
1002     * 小于 {@code <}
1003     *
1004     * @param column      列名
1005     * @param value       条件的值
1006     * @param isEffective 是否有效
1007     */
1008    @Override
1009    public <V> R lt(String column, V value, Predicate<V> isEffective) {
1010        if (isEffective.test(value)) {
1011            and(QueryMethods.column(column).lt_(value));
1012        }
1013        return (R) this;
1014    }
1015
1016    /**
1017     * 小于 {@code <}
1018     *
1019     * @param column      列名, lambda 展示
1020     * @param value       值
1021     * @param isEffective 是否有效
1022     */
1023    @Override
1024    public <T, V> R lt(LambdaGetter<T> column, V value, Predicate<V> isEffective) {
1025        if (isEffective.test(value)) {
1026            and(QueryMethods.column(column).lt_(value));
1027        }
1028        return (R) this;
1029    }
1030
1031
1032    /**
1033     * 小于等于 {@code <=}
1034     *
1035     * @param column 列名
1036     * @param value  条件的值
1037     */
1038    @Override
1039    public R le(String column, Object value) {
1040        and(QueryMethods.column(column).le(value));
1041        return (R) this;
1042    }
1043
1044    /**
1045     * 小于等于 {@code <=}
1046     *
1047     * @param column 列名, lambda 展示
1048     * @param value  值
1049     */
1050    @Override
1051    public <T> R le(LambdaGetter<T> column, Object value) {
1052        and(QueryMethods.column(column).le(value));
1053        return (R) this;
1054    }
1055
1056    /**
1057     * 小于等于 {@code <=}
1058     *
1059     * @param column      列名
1060     * @param value       条件的值
1061     * @param isEffective 是否有效
1062     */
1063    @Override
1064    public R le(String column, Object value, boolean isEffective) {
1065        if (isEffective) {
1066            and(QueryMethods.column(column).le_(value));
1067        }
1068        return (R) this;
1069    }
1070
1071    /**
1072     * 小于等于 {@code <=}
1073     *
1074     * @param column      列名, lambda 展示
1075     * @param value       值
1076     * @param isEffective 是否有效
1077     */
1078    @Override
1079    public <T> R le(LambdaGetter<T> column, Object value, boolean isEffective) {
1080        if (isEffective) {
1081            and(QueryMethods.column(column).le_(value));
1082        }
1083        return (R) this;
1084    }
1085
1086    /**
1087     * 小于等于 {@code <=}
1088     *
1089     * @param column      列名
1090     * @param value       条件的值
1091     * @param isEffective 是否有效
1092     */
1093    @Override
1094    public <V> R le(String column, V value, Predicate<V> isEffective) {
1095        if (isEffective.test(value)) {
1096            and(QueryMethods.column(column).le_(value));
1097        }
1098        return (R) this;
1099    }
1100
1101    /**
1102     * 小于等于 {@code <=}
1103     *
1104     * @param column      列名, lambda 展示
1105     * @param value       值
1106     * @param isEffective 是否有效
1107     */
1108    @Override
1109    public <T, V> R le(LambdaGetter<T> column, V value, Predicate<V> isEffective) {
1110        if (isEffective.test(value)) {
1111            and(QueryMethods.column(column).le_(value));
1112        }
1113        return (R) this;
1114    }
1115
1116
1117    /**
1118     * {@code IN(value)}
1119     *
1120     * @param column 列名
1121     * @param values 条件的值
1122     */
1123    @Override
1124    public R in(String column, Object... values) {
1125        and(QueryMethods.column(column).in(values, true));
1126        return (R) this;
1127    }
1128
1129    /**
1130     * {@code IN(value)}
1131     *
1132     * @param column 列名, lambda 展示
1133     * @param values 值
1134     */
1135    @Override
1136    public <T> R in(LambdaGetter<T> column, Object... values) {
1137        and(QueryMethods.column(column).in(values, true));
1138        return (R) this;
1139    }
1140
1141
1142    /**
1143     * {@code IN(value)}
1144     *
1145     * @param column       列名
1146     * @param queryWrapper 条件的值
1147     */
1148    @Override
1149    public R in(String column, QueryWrapper queryWrapper) {
1150        and(QueryMethods.column(column).in(queryWrapper));
1151        return (R) this;
1152    }
1153
1154
1155    /**
1156     * {@code IN(value)}
1157     *
1158     * @param column       列名, lambda 展示
1159     * @param queryWrapper 值
1160     */
1161    @Override
1162    public <T> R in(LambdaGetter<T> column, QueryWrapper queryWrapper) {
1163        and(QueryMethods.column(column).in(queryWrapper));
1164        return (R) this;
1165    }
1166
1167
1168    /**
1169     * {@code IN(value)}
1170     *
1171     * @param column 列名
1172     * @param values 条件的值
1173     */
1174    @Override
1175    public R in(String column, Collection<?> values) {
1176        and(QueryMethods.column(column).in(values));
1177        return (R) this;
1178    }
1179
1180    /**
1181     * {@code IN(value)}
1182     *
1183     * @param column 列名, lambda 展示
1184     * @param values 值
1185     */
1186    @Override
1187    public <T> R in(LambdaGetter<T> column, Collection<?> values) {
1188        and(QueryMethods.column(column).in(values));
1189        return (R) this;
1190    }
1191
1192
1193    /**
1194     * {@code IN(value)}
1195     *
1196     * @param column 列名
1197     * @param values 条件的值
1198     */
1199    @Override
1200    public R in(String column, Object[] values, boolean isEffective) {
1201        if (isEffective) {
1202            and(QueryMethods.column(column).in(values, true));
1203        }
1204        return (R) this;
1205    }
1206
1207    /**
1208     * {@code IN(value)}
1209     *
1210     * @param column 列名, lambda 展示
1211     * @param values 值
1212     */
1213    @Override
1214    public <T> R in(LambdaGetter<T> column, Object[] values, boolean isEffective) {
1215        if (isEffective) {
1216            and(QueryMethods.column(column).in(values, true));
1217        }
1218        return (R) this;
1219    }
1220
1221
1222    /**
1223     * {@code IN(value)}
1224     *
1225     * @param column 列名
1226     * @param values 条件的值
1227     */
1228    @Override
1229    public R in(String column, Collection<?> values, boolean isEffective) {
1230        if (isEffective) {
1231            and(QueryMethods.column(column).in(values, true));
1232        }
1233        return (R) this;
1234    }
1235
1236    /**
1237     * {@code IN(value)}
1238     *
1239     * @param column 列名, lambda 展示
1240     * @param values 值
1241     */
1242    @Override
1243    public <T> R in(LambdaGetter<T> column, Collection<?> values, boolean isEffective) {
1244        if (isEffective) {
1245            and(QueryMethods.column(column).in(values, true));
1246        }
1247        return (R) this;
1248    }
1249
1250
1251    /**
1252     * {@code IN(value)}
1253     *
1254     * @param column       列名
1255     * @param queryWrapper 条件的值
1256     */
1257    @Override
1258    public R in(String column, QueryWrapper queryWrapper, boolean isEffective) {
1259        if (isEffective) {
1260            and(QueryMethods.column(column).in(queryWrapper, true));
1261        }
1262        return (R) this;
1263    }
1264
1265
1266    /**
1267     * {@code IN(value)}
1268     *
1269     * @param column       列名, lambda 展示
1270     * @param queryWrapper 值
1271     */
1272    @Override
1273    public <T> R in(LambdaGetter<T> column, QueryWrapper queryWrapper, boolean isEffective) {
1274        if (isEffective) {
1275            and(QueryMethods.column(column).in(queryWrapper, true));
1276        }
1277        return (R) this;
1278    }
1279
1280
1281    /**
1282     * {@code IN(value)}
1283     *
1284     * @param column       列名
1285     * @param queryWrapper 条件的值
1286     */
1287    @Override
1288    public R in(String column, QueryWrapper queryWrapper, BooleanSupplier isEffective) {
1289        if (isEffective.getAsBoolean()) {
1290            and(QueryMethods.column(column).in(queryWrapper, true));
1291        }
1292        return (R) this;
1293    }
1294
1295
1296    /**
1297     * {@code IN(value)}
1298     *
1299     * @param column       列名, lambda 展示
1300     * @param queryWrapper 值
1301     */
1302    @Override
1303    public <T> R in(LambdaGetter<T> column, QueryWrapper queryWrapper, BooleanSupplier isEffective) {
1304        if (isEffective.getAsBoolean()) {
1305            and(QueryMethods.column(column).in(queryWrapper, true));
1306        }
1307        return (R) this;
1308    }
1309
1310
1311    /**
1312     * {@code NOT IN(value)}
1313     *
1314     * @param column 列名
1315     * @param values 条件的值
1316     */
1317    @Override
1318    public R notIn(String column, Object... values) {
1319        and(QueryMethods.column(column).notIn(values));
1320        return (R) this;
1321    }
1322
1323    /**
1324     * {@code NOT IN(value)}
1325     *
1326     * @param column 列名, lambda 展示
1327     * @param values 值
1328     */
1329    @Override
1330    public <T> R notIn(LambdaGetter<T> column, Object... values) {
1331        and(QueryMethods.column(column).notIn(values));
1332        return (R) this;
1333    }
1334
1335
1336    /**
1337     * {@code NOT IN(value)}
1338     *
1339     * @param column       列名
1340     * @param queryWrapper 条件的值
1341     */
1342    @Override
1343    public R notIn(String column, QueryWrapper queryWrapper) {
1344        and(QueryMethods.column(column).notIn(queryWrapper));
1345        return (R) this;
1346    }
1347
1348
1349    /**
1350     * {@code NOT IN(value)}
1351     *
1352     * @param column       列名, lambda 展示
1353     * @param queryWrapper 值
1354     */
1355    @Override
1356    public <T> R notIn(LambdaGetter<T> column, QueryWrapper queryWrapper) {
1357        and(QueryMethods.column(column).notIn(queryWrapper));
1358        return (R) this;
1359    }
1360
1361
1362    /**
1363     * {@code NOT IN(value)}
1364     *
1365     * @param column 列名
1366     * @param values 条件的值
1367     */
1368    @Override
1369    public R notIn(String column, Collection<?> values) {
1370        and(QueryMethods.column(column).notIn(values));
1371        return (R) this;
1372    }
1373
1374    /**
1375     * {@code NOT IN(value)}
1376     *
1377     * @param column 列名, lambda 展示
1378     * @param values 值
1379     */
1380    @Override
1381    public <T> R notIn(LambdaGetter<T> column, Collection<?> values) {
1382        and(QueryMethods.column(column).notIn(values));
1383        return (R) this;
1384    }
1385
1386
1387    /**
1388     * {@code NOT IN(value)}
1389     *
1390     * @param column 列名
1391     * @param values 条件的值
1392     */
1393    @Override
1394    public R notIn(String column, Object[] values, boolean isEffective) {
1395        if (isEffective) {
1396            and(QueryMethods.column(column).notIn(values, true));
1397        }
1398        return (R) this;
1399    }
1400
1401    /**
1402     * {@code NOT IN(value)}
1403     *
1404     * @param column 列名, lambda 展示
1405     * @param values 值
1406     */
1407    @Override
1408    public <T> R notIn(LambdaGetter<T> column, Object[] values, boolean isEffective) {
1409        if (isEffective) {
1410            and(QueryMethods.column(column).notIn(values, true));
1411        }
1412        return (R) this;
1413    }
1414
1415
1416    /**
1417     * {@code NOT IN(value)}
1418     *
1419     * @param column 列名
1420     * @param values 条件的值
1421     */
1422    @Override
1423    public R notIn(String column, Collection<?> values, boolean isEffective) {
1424        if (isEffective) {
1425            and(QueryMethods.column(column).notIn(values, true));
1426        }
1427        return (R) this;
1428    }
1429
1430    /**
1431     * {@code NOT IN(value)}
1432     *
1433     * @param column 列名, lambda 展示
1434     * @param values 值
1435     */
1436    @Override
1437    public <T> R notIn(LambdaGetter<T> column, Collection<?> values, boolean isEffective) {
1438        if (isEffective) {
1439            and(QueryMethods.column(column).notIn(values, true));
1440        }
1441        return (R) this;
1442    }
1443
1444
1445    /**
1446     * {@code NOT IN(value)}
1447     *
1448     * @param column       列名
1449     * @param queryWrapper 条件的值
1450     */
1451    @Override
1452    public R notIn(String column, QueryWrapper queryWrapper, boolean isEffective) {
1453        if (isEffective) {
1454            and(QueryMethods.column(column).notIn(queryWrapper, true));
1455        }
1456        return (R) this;
1457    }
1458
1459
1460    /**
1461     * {@code NOT IN(value)}
1462     *
1463     * @param column       列名, lambda 展示
1464     * @param queryWrapper 值
1465     */
1466    @Override
1467    public <T> R notIn(LambdaGetter<T> column, QueryWrapper queryWrapper, boolean isEffective) {
1468        if (isEffective) {
1469            and(QueryMethods.column(column).notIn(queryWrapper, true));
1470        }
1471        return (R) this;
1472    }
1473
1474
1475    /**
1476     * {@code NOT IN(value)}
1477     *
1478     * @param column       列名
1479     * @param queryWrapper 条件的值
1480     */
1481    @Override
1482    public R notIn(String column, QueryWrapper queryWrapper, BooleanSupplier isEffective) {
1483        if (isEffective.getAsBoolean()) {
1484            and(QueryMethods.column(column).notIn(queryWrapper, true));
1485        }
1486        return (R) this;
1487    }
1488
1489
1490    /**
1491     * {@code NOT IN(value)}
1492     *
1493     * @param column       列名, lambda 展示
1494     * @param queryWrapper 值
1495     */
1496    @Override
1497    public <T> R notIn(LambdaGetter<T> column, QueryWrapper queryWrapper, BooleanSupplier isEffective) {
1498        if (isEffective.getAsBoolean()) {
1499            and(QueryMethods.column(column).notIn(queryWrapper, true));
1500        }
1501        return (R) this;
1502    }
1503
1504
1505    /**
1506     * {@code BETWEEN start AND end}
1507     *
1508     * @param column 列名
1509     * @param start  开始的值
1510     * @param end    结束的值
1511     */
1512    @Override
1513    public R between(String column, Object start, Object end) {
1514        and(QueryMethods.column(column).between(start, end));
1515        return (R) this;
1516    }
1517
1518    /**
1519     * {@code BETWEEN start AND end}
1520     *
1521     * @param column 列名
1522     * @param start  开始的值
1523     * @param end    结束的值
1524     */
1525    @Override
1526    public <T> R between(LambdaGetter<T> column, Object start, Object end) {
1527        and(QueryMethods.column(column).between(start, end));
1528        return (R) this;
1529    }
1530
1531    /**
1532     * {@code BETWEEN start AND end}
1533     *
1534     * @param column 列名
1535     * @param start  开始的值
1536     * @param end    结束的值
1537     */
1538    @Override
1539    public R between(String column, Object start, Object end, boolean isEffective) {
1540        if (isEffective) {
1541            and(QueryMethods.column(column).between(start, end, true));
1542        }
1543        return (R) this;
1544    }
1545
1546    /**
1547     * {@code BETWEEN start AND end}
1548     *
1549     * @param column 列名
1550     * @param start  开始的值
1551     * @param end    结束的值
1552     */
1553    @Override
1554    public <T> R between(LambdaGetter<T> column, Object start, Object end, boolean isEffective) {
1555        if (isEffective) {
1556            and(QueryMethods.column(column).between(start, end, true));
1557        }
1558        return (R) this;
1559    }
1560
1561
1562    /**
1563     * {@code BETWEEN start AND end}
1564     *
1565     * @param column 列名
1566     * @param start  开始的值
1567     * @param end    结束的值
1568     */
1569    @Override
1570    public R between(String column, Object start, Object end, BooleanSupplier isEffective) {
1571        if (isEffective.getAsBoolean()) {
1572            and(QueryMethods.column(column).between(start, end, true));
1573        }
1574        return (R) this;
1575    }
1576
1577    /**
1578     * {@code BETWEEN start AND end}
1579     *
1580     * @param column 列名
1581     * @param start  开始的值
1582     * @param end    结束的值
1583     */
1584    @Override
1585    public <T> R between(LambdaGetter<T> column, Object start, Object end, BooleanSupplier isEffective) {
1586        if (isEffective.getAsBoolean()) {
1587            and(QueryMethods.column(column).between(start, end, true));
1588        }
1589        return (R) this;
1590    }
1591
1592
1593    /**
1594     * {@code NOT BETWEEN start AND end}
1595     *
1596     * @param column 列名
1597     * @param start  开始的值
1598     * @param end    结束的值
1599     */
1600    @Override
1601    public R notBetween(String column, Object start, Object end) {
1602        and(QueryMethods.column(column).notBetween(start, end));
1603        return (R) this;
1604    }
1605
1606    /**
1607     * {@code NOT BETWEEN start AND end}
1608     *
1609     * @param column 列名
1610     * @param start  开始的值
1611     * @param end    结束的值
1612     */
1613    @Override
1614    public <T> R notBetween(LambdaGetter<T> column, Object start, Object end) {
1615        and(QueryMethods.column(column).notBetween(start, end));
1616        return (R) this;
1617    }
1618
1619    /**
1620     * {@code NOT BETWEEN start AND end}
1621     *
1622     * @param column 列名
1623     * @param start  开始的值
1624     * @param end    结束的值
1625     */
1626    @Override
1627    public R notBetween(String column, Object start, Object end, boolean isEffective) {
1628        if (isEffective) {
1629            and(QueryMethods.column(column).notBetween(start, end, true));
1630        }
1631        return (R) this;
1632    }
1633
1634    /**
1635     * {@code NOT BETWEEN start AND end}
1636     *
1637     * @param column 列名
1638     * @param start  开始的值
1639     * @param end    结束的值
1640     */
1641    @Override
1642    public <T> R notBetween(LambdaGetter<T> column, Object start, Object end, boolean isEffective) {
1643        if (isEffective) {
1644            and(QueryMethods.column(column).notBetween(start, end, true));
1645        }
1646        return (R) this;
1647    }
1648
1649
1650    /**
1651     * {@code NOT BETWEEN start AND end}
1652     *
1653     * @param column 列名
1654     * @param start  开始的值
1655     * @param end    结束的值
1656     */
1657    @Override
1658    public R notBetween(String column, Object start, Object end, BooleanSupplier isEffective) {
1659        if (isEffective.getAsBoolean()) {
1660            and(QueryMethods.column(column).notBetween(start, end, true));
1661        }
1662        return (R) this;
1663    }
1664
1665    /**
1666     * {@code NOT BETWEEN start AND end}
1667     *
1668     * @param column 列名
1669     * @param start  开始的值
1670     * @param end    结束的值
1671     */
1672    @Override
1673    public <T> R notBetween(LambdaGetter<T> column, Object start, Object end, BooleanSupplier isEffective) {
1674        if (isEffective.getAsBoolean()) {
1675            and(QueryMethods.column(column).notBetween(start, end, true));
1676        }
1677        return (R) this;
1678    }
1679
1680
1681    /**
1682     * {@code LIKE %value%}
1683     *
1684     * @param column 列名
1685     * @param value  条件的值
1686     */
1687    @Override
1688    public R like(String column, Object value) {
1689        and(QueryMethods.column(column).like(value));
1690        return (R) this;
1691    }
1692
1693    /**
1694     * {@code LIKE %value%}
1695     *
1696     * @param column 列名, lambda 展示
1697     * @param value  值
1698     */
1699    @Override
1700    public <T> R like(LambdaGetter<T> column, Object value) {
1701        and(QueryMethods.column(column).like(value));
1702        return (R) this;
1703    }
1704
1705    /**
1706     * {@code LIKE %value%}
1707     *
1708     * @param column      列名
1709     * @param value       条件的值
1710     * @param isEffective 是否有效
1711     */
1712    @Override
1713    public R like(String column, Object value, boolean isEffective) {
1714        if (isEffective) {
1715            and(QueryMethods.column(column).like_(value));
1716        }
1717        return (R) this;
1718    }
1719
1720    /**
1721     * {@code LIKE %value%}
1722     *
1723     * @param column      列名, lambda 展示
1724     * @param value       值
1725     * @param isEffective 是否有效
1726     */
1727    @Override
1728    public <T> R like(LambdaGetter<T> column, Object value, boolean isEffective) {
1729        if (isEffective) {
1730            and(QueryMethods.column(column).like_(value));
1731        }
1732        return (R) this;
1733    }
1734
1735    /**
1736     * {@code LIKE %value%}
1737     *
1738     * @param column      列名
1739     * @param value       条件的值
1740     * @param isEffective 是否有效
1741     */
1742    @Override
1743    public <V> R like(String column, V value, Predicate<V> isEffective) {
1744        if (isEffective.test(value)) {
1745            and(QueryMethods.column(column).like_(value));
1746        }
1747        return (R) this;
1748    }
1749
1750    /**
1751     * {@code LIKE %value%}
1752     *
1753     * @param column      列名, lambda 展示
1754     * @param value       值
1755     * @param isEffective 是否有效
1756     */
1757    @Override
1758    public <T, V> R like(LambdaGetter<T> column, V value, Predicate<V> isEffective) {
1759        if (isEffective.test(value)) {
1760            and(QueryMethods.column(column).like_(value));
1761        }
1762        return (R) this;
1763    }
1764
1765
1766    /**
1767     * {@code LIKE value%}
1768     *
1769     * @param column 列名
1770     * @param value  条件的值
1771     */
1772    @Override
1773    public R likeLeft(String column, Object value) {
1774        and(QueryMethods.column(column).likeLeft(value));
1775        return (R) this;
1776    }
1777
1778    /**
1779     * {@code LIKE value%}
1780     *
1781     * @param column 列名, lambda 展示
1782     * @param value  值
1783     */
1784    @Override
1785    public <T> R likeLeft(LambdaGetter<T> column, Object value) {
1786        and(QueryMethods.column(column).likeLeft(value));
1787        return (R) this;
1788    }
1789
1790    /**
1791     * {@code LIKE value%}
1792     *
1793     * @param column      列名
1794     * @param value       条件的值
1795     * @param isEffective 是否有效
1796     */
1797    @Override
1798    public R likeLeft(String column, Object value, boolean isEffective) {
1799        if (isEffective) {
1800            and(QueryMethods.column(column).likeLeft_(value));
1801        }
1802        return (R) this;
1803    }
1804
1805    /**
1806     * {@code LIKE value%}
1807     *
1808     * @param column      列名, lambda 展示
1809     * @param value       值
1810     * @param isEffective 是否有效
1811     */
1812    @Override
1813    public <T> R likeLeft(LambdaGetter<T> column, Object value, boolean isEffective) {
1814        if (isEffective) {
1815            and(QueryMethods.column(column).likeLeft_(value));
1816        }
1817        return (R) this;
1818    }
1819
1820    /**
1821     * {@code LIKE value%}
1822     *
1823     * @param column      列名
1824     * @param value       条件的值
1825     * @param isEffective 是否有效
1826     */
1827    @Override
1828    public <V> R likeLeft(String column, V value, Predicate<V> isEffective) {
1829        if (isEffective.test(value)) {
1830            and(QueryMethods.column(column).likeLeft_(value));
1831        }
1832        return (R) this;
1833    }
1834
1835    /**
1836     * {@code LIKE value%}
1837     *
1838     * @param column      列名, lambda 展示
1839     * @param value       值
1840     * @param isEffective 是否有效
1841     */
1842    @Override
1843    public <T, V> R likeLeft(LambdaGetter<T> column, V value, Predicate<V> isEffective) {
1844        if (isEffective.test(value)) {
1845            and(QueryMethods.column(column).likeLeft_(value));
1846        }
1847        return (R) this;
1848    }
1849
1850
1851    /**
1852     * {@code LIKE %value}
1853     *
1854     * @param column 列名
1855     * @param value  条件的值
1856     */
1857    @Override
1858    public R likeRight(String column, Object value) {
1859        and(QueryMethods.column(column).likeRight(value));
1860        return (R) this;
1861    }
1862
1863    /**
1864     * {@code LIKE %value}
1865     *
1866     * @param column 列名, lambda 展示
1867     * @param value  值
1868     */
1869    @Override
1870    public <T> R likeRight(LambdaGetter<T> column, Object value) {
1871        and(QueryMethods.column(column).likeRight(value));
1872        return (R) this;
1873    }
1874
1875    /**
1876     * {@code LIKE %value}
1877     *
1878     * @param column      列名
1879     * @param value       条件的值
1880     * @param isEffective 是否有效
1881     */
1882    @Override
1883    public R likeRight(String column, Object value, boolean isEffective) {
1884        if (isEffective) {
1885            and(QueryMethods.column(column).likeRight_(value));
1886        }
1887        return (R) this;
1888    }
1889
1890    /**
1891     * {@code LIKE %value}
1892     *
1893     * @param column      列名, lambda 展示
1894     * @param value       值
1895     * @param isEffective 是否有效
1896     */
1897    @Override
1898    public <T> R likeRight(LambdaGetter<T> column, Object value, boolean isEffective) {
1899        if (isEffective) {
1900            and(QueryMethods.column(column).likeRight_(value));
1901        }
1902        return (R) this;
1903    }
1904
1905    /**
1906     * {@code LIKE %value}
1907     *
1908     * @param column      列名
1909     * @param value       条件的值
1910     * @param isEffective 是否有效
1911     */
1912    @Override
1913    public <V> R likeRight(String column, V value, Predicate<V> isEffective) {
1914        if (isEffective.test(value)) {
1915            and(QueryMethods.column(column).likeRight_(value));
1916        }
1917        return (R) this;
1918    }
1919
1920    /**
1921     * {@code LIKE %value}
1922     *
1923     * @param column      列名, lambda 展示
1924     * @param value       值
1925     * @param isEffective 是否有效
1926     */
1927    @Override
1928    public <T, V> R likeRight(LambdaGetter<T> column, V value, Predicate<V> isEffective) {
1929        if (isEffective.test(value)) {
1930            and(QueryMethods.column(column).likeRight_(value));
1931        }
1932        return (R) this;
1933    }
1934
1935
1936    /**
1937     * {@code NOT LIKE %value%}
1938     *
1939     * @param column 列名
1940     * @param value  条件的值
1941     */
1942    @Override
1943    public R notLike(String column, Object value) {
1944        and(QueryMethods.column(column).notLike(value));
1945        return (R) this;
1946    }
1947
1948    /**
1949     * {@code NOT LIKE %value%}
1950     *
1951     * @param column 列名, lambda 展示
1952     * @param value  值
1953     */
1954    @Override
1955    public <T> R notLike(LambdaGetter<T> column, Object value) {
1956        and(QueryMethods.column(column).notLike(value));
1957        return (R) this;
1958    }
1959
1960    /**
1961     * {@code NOT LIKE %value%}
1962     *
1963     * @param column      列名
1964     * @param value       条件的值
1965     * @param isEffective 是否有效
1966     */
1967    @Override
1968    public R notLike(String column, Object value, boolean isEffective) {
1969        if (isEffective) {
1970            and(QueryMethods.column(column).notLike_(value));
1971        }
1972        return (R) this;
1973    }
1974
1975    /**
1976     * {@code NOT LIKE %value%}
1977     *
1978     * @param column      列名, lambda 展示
1979     * @param value       值
1980     * @param isEffective 是否有效
1981     */
1982    @Override
1983    public <T> R notLike(LambdaGetter<T> column, Object value, boolean isEffective) {
1984        if (isEffective) {
1985            and(QueryMethods.column(column).notLike_(value));
1986        }
1987        return (R) this;
1988    }
1989
1990    /**
1991     * {@code NOT LIKE %value%}
1992     *
1993     * @param column      列名
1994     * @param value       条件的值
1995     * @param isEffective 是否有效
1996     */
1997    @Override
1998    public <V> R notLike(String column, V value, Predicate<V> isEffective) {
1999        if (isEffective.test(value)) {
2000            and(QueryMethods.column(column).notLike_(value));
2001        }
2002        return (R) this;
2003    }
2004
2005    /**
2006     * {@code NOT LIKE %value%}
2007     *
2008     * @param column      列名, lambda 展示
2009     * @param value       值
2010     * @param isEffective 是否有效
2011     */
2012    @Override
2013    public <T, V> R notLike(LambdaGetter<T> column, V value, Predicate<V> isEffective) {
2014        if (isEffective.test(value)) {
2015            and(QueryMethods.column(column).notLike_(value));
2016        }
2017        return (R) this;
2018    }
2019
2020
2021    /**
2022     * {@code NOT LIKE value%}
2023     *
2024     * @param column 列名
2025     * @param value  条件的值
2026     */
2027    @Override
2028    public R notLikeLeft(String column, Object value) {
2029        and(QueryMethods.column(column).notLikeLeft(value));
2030        return (R) this;
2031    }
2032
2033    /**
2034     * {@code NOT LIKE value%}
2035     *
2036     * @param column 列名, lambda 展示
2037     * @param value  值
2038     */
2039    @Override
2040    public <T> R notLikeLeft(LambdaGetter<T> column, Object value) {
2041        and(QueryMethods.column(column).notLikeLeft(value));
2042        return (R) this;
2043    }
2044
2045    /**
2046     * {@code NOT LIKE value%}
2047     *
2048     * @param column      列名
2049     * @param value       条件的值
2050     * @param isEffective 是否有效
2051     */
2052    @Override
2053    public R notLikeLeft(String column, Object value, boolean isEffective) {
2054        if (isEffective) {
2055            and(QueryMethods.column(column).notLikeLeft_(value));
2056        }
2057        return (R) this;
2058    }
2059
2060    /**
2061     * {@code NOT LIKE value%}
2062     *
2063     * @param column      列名, lambda 展示
2064     * @param value       值
2065     * @param isEffective 是否有效
2066     */
2067    @Override
2068    public <T> R notLikeLeft(LambdaGetter<T> column, Object value, boolean isEffective) {
2069        if (isEffective) {
2070            and(QueryMethods.column(column).notLikeLeft_(value));
2071        }
2072        return (R) this;
2073    }
2074
2075    /**
2076     * {@code NOT LIKE value%}
2077     *
2078     * @param column      列名
2079     * @param value       条件的值
2080     * @param isEffective 是否有效
2081     */
2082    @Override
2083    public <V> R notLikeLeft(String column, V value, Predicate<V> isEffective) {
2084        if (isEffective.test(value)) {
2085            and(QueryMethods.column(column).notLikeLeft_(value));
2086        }
2087        return (R) this;
2088    }
2089
2090    /**
2091     * {@code NOT LIKE value%}
2092     *
2093     * @param column      列名, lambda 展示
2094     * @param value       值
2095     * @param isEffective 是否有效
2096     */
2097    @Override
2098    public <T, V> R notLikeLeft(LambdaGetter<T> column, V value, Predicate<V> isEffective) {
2099        if (isEffective.test(value)) {
2100            and(QueryMethods.column(column).notLikeLeft_(value));
2101        }
2102        return (R) this;
2103    }
2104
2105
2106    /**
2107     * {@code NOT LIKE %value}
2108     *
2109     * @param column 列名
2110     * @param value  条件的值
2111     */
2112    @Override
2113    public R notLikeRight(String column, Object value) {
2114        and(QueryMethods.column(column).notLikeRight(value));
2115        return (R) this;
2116    }
2117
2118    /**
2119     * {@code NOT LIKE %value}
2120     *
2121     * @param column 列名, lambda 展示
2122     * @param value  值
2123     */
2124    @Override
2125    public <T> R notLikeRight(LambdaGetter<T> column, Object value) {
2126        and(QueryMethods.column(column).notLikeRight(value));
2127        return (R) this;
2128    }
2129
2130    /**
2131     * {@code NOT LIKE %value}
2132     *
2133     * @param column      列名
2134     * @param value       条件的值
2135     * @param isEffective 是否有效
2136     */
2137    @Override
2138    public R notLikeRight(String column, Object value, boolean isEffective) {
2139        if (isEffective) {
2140            and(QueryMethods.column(column).notLikeRight_(value));
2141        }
2142        return (R) this;
2143    }
2144
2145    /**
2146     * {@code NOT LIKE %value}
2147     *
2148     * @param column      列名, lambda 展示
2149     * @param value       值
2150     * @param isEffective 是否有效
2151     */
2152    @Override
2153    public <T> R notLikeRight(LambdaGetter<T> column, Object value, boolean isEffective) {
2154        if (isEffective) {
2155            and(QueryMethods.column(column).notLikeRight_(value));
2156        }
2157        return (R) this;
2158    }
2159
2160    /**
2161     * {@code NOT LIKE %value}
2162     *
2163     * @param column      列名
2164     * @param value       条件的值
2165     * @param isEffective 是否有效
2166     */
2167    @Override
2168    public <V> R notLikeRight(String column, V value, Predicate<V> isEffective) {
2169        if (isEffective.test(value)) {
2170            and(QueryMethods.column(column).notLikeRight_(value));
2171        }
2172        return (R) this;
2173    }
2174
2175    /**
2176     * {@code NOT LIKE %value}
2177     *
2178     * @param column      列名, lambda 展示
2179     * @param value       值
2180     * @param isEffective 是否有效
2181     */
2182    @Override
2183    public <T, V> R notLikeRight(LambdaGetter<T> column, V value, Predicate<V> isEffective) {
2184        if (isEffective.test(value)) {
2185            and(QueryMethods.column(column).notLikeRight_(value));
2186        }
2187        return (R) this;
2188    }
2189
2190
2191    /**
2192     * {@code IS NULL}
2193     *
2194     * @param column 列名
2195     */
2196    @Override
2197    public R isNull(String column) {
2198        and(QueryMethods.column(column).isNull());
2199        return (R) this;
2200    }
2201
2202    /**
2203     * {@code IS NULL}
2204     *
2205     * @param column 列名, lambda 展示
2206     */
2207    @Override
2208    public <T> R isNull(LambdaGetter<T> column) {
2209        and(QueryMethods.column(column).isNull());
2210        return (R) this;
2211    }
2212
2213    /**
2214     * {@code IS NULL}
2215     *
2216     * @param column      列名
2217     * @param isEffective 是否有效
2218     */
2219    @Override
2220    public R isNull(String column, boolean isEffective) {
2221        if (isEffective) {
2222            and(QueryMethods.column(column).isNull());
2223        }
2224        return (R) this;
2225    }
2226
2227    /**
2228     * {@code IS NULL}
2229     *
2230     * @param column      列名, lambda 展示
2231     * @param isEffective 是否有效
2232     */
2233    @Override
2234    public <T> R isNull(LambdaGetter<T> column, boolean isEffective) {
2235        if (isEffective) {
2236            and(QueryMethods.column(column).isNull());
2237        }
2238        return (R) this;
2239    }
2240
2241    /**
2242     * {@code IS NULL}
2243     *
2244     * @param column      列名
2245     * @param isEffective 是否有效
2246     */
2247    @Override
2248    public R isNull(String column, BooleanSupplier isEffective) {
2249        if (isEffective.getAsBoolean()) {
2250            and(QueryMethods.column(column).isNull());
2251        }
2252        return (R) this;
2253    }
2254
2255    /**
2256     * {@code IS NULL}
2257     *
2258     * @param column      列名, lambda 展示
2259     * @param isEffective 是否有效
2260     */
2261    @Override
2262    public <T> R isNull(LambdaGetter<T> column, BooleanSupplier isEffective) {
2263        if (isEffective.getAsBoolean()) {
2264            and(QueryMethods.column(column).isNull());
2265        }
2266        return (R) this;
2267    }
2268
2269
2270    /**
2271     * {@code IS NOT NULL}
2272     *
2273     * @param column 列名
2274     */
2275    @Override
2276    public R isNotNull(String column) {
2277        and(QueryMethods.column(column).isNotNull());
2278        return (R) this;
2279    }
2280
2281    /**
2282     * {@code IS NOT NULL}
2283     *
2284     * @param column 列名, lambda 展示
2285     */
2286    @Override
2287    public <T> R isNotNull(LambdaGetter<T> column) {
2288        and(QueryMethods.column(column).isNotNull());
2289        return (R) this;
2290    }
2291
2292    /**
2293     * {@code IS NOT NULL}
2294     *
2295     * @param column      列名
2296     * @param isEffective 是否有效
2297     */
2298    @Override
2299    public R isNotNull(String column, boolean isEffective) {
2300        if (isEffective) {
2301            and(QueryMethods.column(column).isNotNull());
2302        }
2303        return (R) this;
2304    }
2305
2306    /**
2307     * {@code IS NOT NULL}
2308     *
2309     * @param column      列名, lambda 展示
2310     * @param isEffective 是否有效
2311     */
2312    @Override
2313    public <T> R isNotNull(LambdaGetter<T> column, boolean isEffective) {
2314        if (isEffective) {
2315            and(QueryMethods.column(column).isNotNull());
2316        }
2317        return (R) this;
2318    }
2319
2320    /**
2321     * {@code IS NOT NULL}
2322     *
2323     * @param column      列名
2324     * @param isEffective 是否有效
2325     */
2326    @Override
2327    public R isNotNull(String column, BooleanSupplier isEffective) {
2328        if (isEffective.getAsBoolean()) {
2329            and(QueryMethods.column(column).isNotNull());
2330        }
2331        return (R) this;
2332    }
2333
2334    /**
2335     * {@code IS NOT NULL}
2336     *
2337     * @param column      列名, lambda 展示
2338     * @param isEffective 是否有效
2339     */
2340    @Override
2341    public <T> R isNotNull(LambdaGetter<T> column, BooleanSupplier isEffective) {
2342        if (isEffective.getAsBoolean()) {
2343            and(QueryMethods.column(column).isNotNull());
2344        }
2345        return (R) this;
2346    }
2347
2348
2349    @Override
2350    public R clone() {
2351        return (R) super.clone();
2352    }
2353
2354}