package com.jy.framework.mybatis.join;

public interface SqlConstant {

    String SQL_PARAM = "sqlParam";

    // ===========================================
    // sql关键字
    // ===========================================
    String SELECT = "SELECT ";
    String DISTINCT = "DISTINCT ";
    String FROM = " FROM ";
    String INNER_JOIN = " INNER JOIN ";
    String LEFT_JOIN = " LEFT JOIN ";
    String RIGHT_JOIN = " RIGHT JOIN ";
    String ON = " ON ";
    String WHERE = " WHERE ";
    String AND = " AND ";
    String OR = " OR ";
    String GROUP_BY = " GROUP BY ";
    String ORDER_BY = " ORDER BY ";
    String ASC = " ASC";
    String DESC = " DESC";
    String LIMIT = " LIMIT ";
    String UNION = " UNION ";
    String UNION_ALL = " UNION ALL ";

    // ===========================================
    // 算术运算符
    // ===========================================
    String ADD = " + ";
    String SUBTRACT = " - ";
    String MULTIPLY = " * ";
    String DIVIDE = " / ";
    String REMAINDER = " % ";

    // ===========================================
    // 比较运算符
    // ===========================================
    String EQ = " = %s";
    String NE = " <> %s";
    String GT = " > %s";
    String LT = " < %s";
    String GE = " >= %s";
    String LE = " <= %s";
    String LIKE = " LIKE CONCAT('%%',%s,'%%')";
    String NOT_LIKE = " NOT LIKE CONCAT('%%',%s,'%%')";
    String IN = " IN (%s)";
    String NOT_IN = " NOT IN (%s)";
    String BETWEEN = " BETWEEN %s AND %s";
    String NOT_BETWEEN = " NOT BETWEEN %s AND %s";
    String LIKE_LEFT = " LIKE CONCAT('%%',%s)";
    String NOT_LIKE_LEFT = " NOT LIKE CONCAT('%%',%s)";
    String LIKE_RIGHT = " LIKE CONCAT(%s,'%%')";
    String NOT_LIKE_RIGHT = " NOT LIKE CONCAT(%s,'%%')";
    String IS_NULL = " IS NULL";
    String IS_NOT_NULL = " IS NOT NULL";

    // ===========================================
    // 函数
    // ===========================================
    String COUNT = "COUNT";
    String CONCAT = "CONCAT";
    String GROUP_CONCAT = "GROUP_CONCAT";
    String IF = "IF";
    String IFNULL = "IFNULL";
    String MAX = "MAX";
    String MIN = "MIN";
    String REPLACE = "REPLACE";
    String ROUND = "ROUND";
    String SUBSTR = "SUBSTR";
    String LENGTH = "LENGTH";
    String FIND_IN_SET = "FIND_IN_SET";
    String YEAR = "YEAR";
    String MONTH = "MONTH";
    String DAY = "DAY";
    String HOUR = "HOUR";
    String MINUTE = "MINUTE";
    String SECOND = "SECOND";

}


