package com.tofly.common.oauth.util;

import com.tofly.common.core.util.SpringContextHolder;
import lombok.experimental.UtilityClass;

/**
 * @author tuonbed
 * @date 2020/3/24  16:03
 */
@UtilityClass
public class DataTypeUtil {


    public static String getDataType(){
        return SpringContextHolder.getBean(ToflyDataTypeConstant.class).getDataType();
    }

    public static String getKeywordBydatatype(String key){
        String datatype=getDataType();
        switch (datatype){
            case "mysql":
                return "`"+key+"`";
            default:
                return key;
        }
    }
}
