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