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.constant;
017
018/**
019 * SQL 操作符。
020 *
021 * @author michael
022 * @author 王帅
023 */
024public enum SqlOperator {
025
026    /**
027     * ignore
028     */
029    IGNORE(""),
030
031    /**
032     * >
033     */
034    GT(SqlConsts.GT),
035
036    /**
037     * >=
038     */
039    GE(SqlConsts.GE),
040
041    /**
042     * <
043     */
044    LT(SqlConsts.LT),
045
046    /**
047     * <=
048     */
049    LE(SqlConsts.LE),
050
051    /**
052     * like %value%
053     */
054    LIKE(SqlConsts.LIKE),
055
056    /**
057     * like value%
058     */
059    LIKE_LEFT(SqlConsts.LIKE),
060
061    /**
062     * like %value
063     */
064    LIKE_RIGHT(SqlConsts.LIKE),
065
066    /**
067     * not like %value%
068     */
069    NOT_LIKE(SqlConsts.NOT_LIKE),
070
071    /**
072     * not like value%
073     */
074    NOT_LIKE_LEFT(SqlConsts.NOT_LIKE),
075
076    /**
077     * not like %value
078     */
079    NOT_LIKE_RIGHT(SqlConsts.NOT_LIKE),
080
081    /**
082     * =
083     */
084    EQUALS(SqlConsts.EQUALS),
085
086    /**
087     * !=
088     */
089    NOT_EQUALS(SqlConsts.NOT_EQUALS),
090
091    /**
092     * is null
093     */
094    IS_NULL(SqlConsts.IS_NULL),
095
096    /**
097     * is not null
098     */
099    IS_NOT_NULL(SqlConsts.IS_NOT_NULL),
100
101    /**
102     * in
103     */
104    @Deprecated
105    IN(SqlConsts.IN),
106
107    /**
108     * not in
109     */
110    @Deprecated
111    NOT_IN(SqlConsts.NOT_IN),
112
113    /**
114     * between
115     */
116    @Deprecated
117    BETWEEN(SqlConsts.BETWEEN),
118
119    /**
120     * not between
121     */
122    @Deprecated
123    NOT_BETWEEN(SqlConsts.NOT_BETWEEN);
124
125    private final String value;
126
127    SqlOperator(String value) {
128        this.value = value;
129    }
130
131    public String getValue() {
132        return value;
133    }
134
135}