All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.yulichang.method.SqlMethod Maven / Gradle / Ivy

There is a newer version: 1.5.2
Show newest version
package com.github.yulichang.method;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author yulichang
 * @see com.baomidou.mybatisplus.core.enums.SqlMethod
 * @since 2021/1/15
 */
public enum SqlMethod {
    /**
     * 连表查询
     */
    SELECT_JOIN_COUNT("selectJoinCount", "查询满足条件总记录数",
            ""),

    SELECT_JOIN_ONE("selectJoinOne", "返回一条记录",
            ""),

    SELECT_JOIN_LIST("selectJoinList", "返回List集合",
            ""),

    SELECT_JOIN_MAP("selectJoinMap", "返回一个Map",
            ""),

    SELECT_JOIN_MAPS("selectJoinMaps", "返回Map集合",
            ""),

    SELECT_JOIN_PAGE("selectJoinPage", "连表查询并分页",
            ""),

    SELECT_JOIN_MAPS_PAGE("selectJoinMapsPage", "返回Map集合并分页",
            ""),

    /**
     * 连表删除
     */
    DELETE_JOIN("deleteJoin", "连表删除",
                                  ""),

    /**
     * 连表逻辑删除
     */
    LOGIC_DELETE_JOIN("deleteJoin", "连表逻辑删除", ""),

    /**
     * 连表更新
     */
    UPDATE_JOIN("updateJoin", "连表更新", ""),

    /**
     * 连表逻辑更新 (会更新null字段)
     */
    UPDATE_JOIN_AND_NULL("updateJoinAndNull", "连表更新", ""),
    ;
    private final String method;
    private final String sql;

    @SuppressWarnings("unused")
    SqlMethod(String method, String desc, String sql) {
        this.method = method;
        this.sql = sql;
    }

    public String getMethod() {
        return method;
    }


    public String getSql() {
        return sql;
    }


    public static final List collect = Arrays.stream(SqlMethod.values()).map(SqlMethod::getMethod).collect(Collectors.toList());
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy