snaker-core/src/main/java/org/snaker/engine/access/jdbc/JdbcHelper.java
public static Dialect getDialect(Connection conn) throws Exception {
        DatabaseMetaData databaseMetaData = conn.getMetaData();
        String databaseProductName = databaseMetaData.getDatabaseProductName();
        String dbType = databaseTypeMappings.getProperty(databaseProductName);
		if(StringHelper.isEmpty(dbType)) return null;
        if(dbType.equalsIgnoreCase("mysql")) return new MySqlDialect();
        else if(dbType.equalsIgnoreCase("oracle")) return new OracleDialect();
        else if(dbType.equalsIgnoreCase("postgres")) return new PostgresqlDialect();
        else if(dbType.equalsIgnoreCase("mssql")) return new SQLServerDialect();
		else if(dbType.equalsIgnoreCase("db2")) return new Db2Dialect();
		else if(dbType.equalsIgnoreCase("h2")) return new H2Dialect();
        else return null;
    }
public static Dialect getDialect(Connection conn) throws Exception {
        DatabaseMetaData databaseMetaData = conn.getMetaData();
        String databaseProductName = databaseMetaData.getDatabaseProductName();
        String dbType = databaseTypeMappings.getProperty(databaseProductName);
		if(StringHelper.isEmpty(dbType)) return null;
        if(dbType.equalsIgnoreCase("mysql")) return new MySqlDialect();
        else if(dbType.equalsIgnoreCase("oracle")) return new OracleDialect();
        else if(dbType.equalsIgnoreCase("postgres")) return new PostgresqlDialect();
        else if(dbType.equalsIgnoreCase("mssql")) return new SQLServerDialect();
		else if(dbType.equalsIgnoreCase("db2")) return new Db2Dialect();
		else if(dbType.equalsIgnoreCase("h2")) return new H2Dialect();
        else return null;
    }
根据连接对象获取数据库方言
@param conn 数据库连接
@return Dialect 方言
@throws Exception