gu.sql2java.parser.SqlSyntaxNormalizers Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sql2java-manager Show documentation
Show all versions of sql2java-manager Show documentation
sql2java manager class package for accessing database
package gu.sql2java.parser;
import java.util.Map;
import com.google.common.collect.ImmutableMap;
import gu.sql2java.Constant;
import gu.sql2java.phoenix.PhoenixNormalizer;
/**
* @author guyadong
* @since 3.17.0
*/
public class SqlSyntaxNormalizers implements Constant {
/** 保存不同类型的数据库的对应的 {@link SqlSyntaxNormalizer} 对象 */
private static Map sqlNormalizer =
ImmutableMap.of(
PRODUCT_NAME_PHOENIX,new PhoenixNormalizer());
/**
* 返回指定数据库引擎的{@link SqlSyntaxNormalizer},没有返回{@code null}
* @param engine
*/
public static SqlSyntaxNormalizer normalizerOf(String engine){
return sqlNormalizer.get(engine);
}
}