根据驱动名创建方言<br>
驱动名是不分区大小写完全匹配的

@param driverName JDBC驱动类名
@return 方言
968565
public static Dialect newDialect(String driverName) {
		final Dialect dialect = internalNewDialect(driverName);
		StaticLog.debug("Use Dialect: [{}].", dialect.getClass().getSimpleName());
		return dialect;
	}
1288021
public SqlBuilder from(String... tableNames) {
		if (ArrayUtil.isEmpty(tableNames) || StrUtil.hasBlank(tableNames)) {
			throw new DbRuntimeException("Table name is blank in table names !");
		}

		if (null != wrapper) {
			// 包装表名
			tableNames = wrapper.wrap(tableNames);
		}

		sql.append(" FROM ").append(ArrayUtil.join(tableNames, StrUtil.COMMA));

		return this;
	}
1203317
public SqlPara getSqlPara(String key, Map data) {
		Template template = getSqlTemplate(key);
		if (template == null) {
			return null;
		}
		
		SqlPara sqlPara = new SqlPara();
		data.put(SQL_PARA_KEY, sqlPara);
		sqlPara.setSql(template.renderToString(data));
		data.remove(SQL_PARA_KEY);	// 避免污染传入的 Map
		return sqlPara;
	}
609372
public static Method getFunction(String functionName) {
    return functionMap.get("sql" + functionName.toLowerCase(Locale.US));
  }
1114745
public List<Map<String, String>> getMetadataByTable(String schema, String tableName) throws SQLException {
		
		List<Map<String, String>> table = new ArrayList<Map<String, String>>();

		DatabaseMetaData metadata = conn.getMetaData();
		ResultSet rs = metadata.getColumns(null, schema, tableName, null);
		
		while (rs.next()) {
			
			Map<String, String> field = new HashMap<String, String>();
			
			field.put("NAME",  rs.getString("COLUMN_NAME"));// 字段名称
			field.put("TYPE", rs.getString("TYPE_NAME")); //字段类型名称(例如：VACHAR2)
			field.put("SIZE", Integer.toString(rs.getInt("COLUMN_SIZE"))); //字段长度
			field.put("NULLABLE", rs.getString("IS_NULLABLE")); //是否为空
			field.put("REMARK", rs.getString("REMARKS")); //字段注释
			
			table.add(field);
			
		}

		return table;
	}
475976
public static Map<String, byte[]> getBigData(String sql, Object... arg) {
        Map<String, byte[]> bigDataMap = new HashMap<String, byte[]>();
        Connection connection = JDBCUtils.getConnection();
        PreparedStatement ps = null;
        ResultSet result = null;

        // 填充占位符
        try {
            ps = connection.prepareStatement(sql);
            for (int i = 0; i < arg.length; i++) {
                ps.setObject(i + 1, arg[i]);
            }

            // 执行SQL语句
            result = ps.executeQuery();
            // 获取字段名
            List<String> columnList = DBUtils.getColumnLabels(result);
            // 遍历结果集
            while (result.next()) {
                // 遍历字段名获取相应大数据值
                for (String column : columnList) {
                    Blob data = result.getBlob(column);
                    byte[] datas = data.getBytes(1, (int) data.length());
                    bigDataMap.put(column, datas);
                }
                break;
            }
        } catch (SQLException e) {
            e.printStackTrace();
        } finally {
            JDBCUtils.release(result, ps, connection);
        }

        return bigDataMap;
    }
653197
public static String jvmNameToCanonicalName(String jvmName) {
        boolean isArray = jvmName.charAt(0) == '[';
        if (isArray) {
            String cnName = StringUtils.EMPTY; // 计数，看上几维数组
            int i = 0;
            for (; i < jvmName.length(); i++) {
                if (jvmName.charAt(i) != '[') {
                    break;
                }
                cnName += "[]";
            }
            String componentType = jvmName.substring(i, jvmName.length());
            if ("Z".equals(componentType)) {
                cnName = "boolean" + cnName;
            } else if ("B".equals(componentType)) {
                cnName = "byte" + cnName;
            } else if ("C".equals(componentType)) {
                cnName = "char" + cnName;
            } else if ("D".equals(componentType)) {
                cnName = "double" + cnName;
            } else if ("F".equals(componentType)) {
                cnName = "float" + cnName;
            } else if ("I".equals(componentType)) {
                cnName = "int" + cnName;
            } else if ("J".equals(componentType)) {
                cnName = "long" + cnName;
            } else if ("S".equals(componentType)) {
                cnName = "short" + cnName;
            } else {
                cnName = componentType.substring(1, componentType.length() - 1) + cnName; // 对象的 去掉L
            }
            return cnName;
        }
        return jvmName;
    }
940422
private static boolean isJDBCClass(@SlashedClassName String name) {
        String clsName = SignatureUtils.stripSignature(name);

        return (clsName.startsWith("java.sql.") || clsName.startsWith("javax.sql.")) && !clsName.endsWith("Exception");
    }
78428
public static String driverClass(String url) {
        assert !blank(url);

        if (url.contains(POSTGRESQL_FRAGMENT)) {
            return "org.postgresql.Driver";
        }
        if (url.contains(MYSQL_FRAGMENT)) {
            return "com.mysql.jdbc.Driver";
        }
        if (url.contains(HSQL_FRAGMENT)) {
            return "org.hsqldb.jdbcDriver";
        }
        if (url.contains(H2_FRAGMENT)) {
            return "org.h2.Driver";
        }
        if (url.contains(SQL_SERVER_JTDS_FRAGMENT)) {
            return "net.sourceforge.jtds.jdbc.Driver";
        }
        if (url.contains(SQL_SERVER_MS_2000_FRAGMENT)) {
            return "com.microsoft.jdbc.sqlserver.SQLServerDriver";
        } // 2000
        if (url.contains(SQL_SERVER_MS_2005_FRAGMENT)) {
            return "com.microsoft.sqlserver.jdbc.SQLServerDriver";
        } // 2005
        if (url.contains(DB2_FRAGMENT)) {
            return "com.ibm.db2.jcc.DB2Driver";
        }
        if (url.contains(ORACLE_FRAGMENT)) {
            return "oracle.jdbc.driver.OracleDriver";
        }

        return null;
    }
71849
public function getCache(string $driverName=''): \Nofuzz\SimpleCache\CacheInterface
  {
    if (empty($driverName)) {
      # Return the 1st Cache in the list
      return (array_values($this->drivers)[0] ?? null);
    } else {
      # Return the Cache for the $driverName
      return $this->drivers[strtolower($driverName)] ?? null;
    }
  }
985599
public static Connection openSpatialDataBase(String dbName) throws SQLException, ClassNotFoundException {
        String dbFilePath = getDataBasePath(dbName);       
        String databasePath = "jdbc:h2:"+ dbFilePath + H2_PARAMETERS;
        org.h2.Driver.load();
        // Keep a connection alive to not close the DataBase on each unit test
        return DriverManager.getConnection(databasePath,
                "sa", "sa");
    }
720523
public static boolean isEmbedded(String driverClassName) {
        return databases
            .stream()
            .filter(JdbcDatabase::isEmbedded)
            .anyMatch(db -> db.driverClassName.equals(driverClassName));
    }
105795
public String generateSqlDelete(String tableName) {
        try {
            return cacheSQLs.get("DELETE:" + tableName, () -> {
                return MessageFormat.format("DELETE FROM {0} WHERE {1}", tableName,
                        strWherePkClause);
            });
        } catch (ExecutionException e) {
            throw new DaoException(e);
        }
    }
1158996
public static boolean loadDriver(String driverClassName) {
        try {
            Class.forName(driverClassName).newInstance();
            return true;

        } catch (ClassNotFoundException e) {
            return false;

        } catch (IllegalAccessException e) {
            // Constructor is private, OK for DriverManager contract
            return true;

        } catch (InstantiationException e) {
            return false;

        } catch (Throwable e) {
            return false;
        }
    }
853631
public static function getDriverName()
    {
        // 连接名
        $connectName    = self::getConnectName();
        $diverName      = ConnectionFactor::getConnectionData($connectName)->getDriver();
        return $diverName;
    }
579954
public static String getDynamicTableName(Class<?> entityClass, String tableName) {
        if (IDynamicTableName.class.isAssignableFrom(entityClass)) {
            StringBuilder sql = new StringBuilder();
            sql.append("<choose>");
            sql.append("<when test=\"@tk.mybatis.mapper.util.OGNL@isDynamicParameter(_parameter) and dynamicTableName != null and dynamicTableName != ''\">");
            sql.append("${dynamicTableName}\n");
            sql.append("</when>");
            //不支持指定列的时候查询全部列
            sql.append("<otherwise>");
            sql.append(tableName);
            sql.append("</otherwise>");
            sql.append("</choose>");
            return sql.toString();
        } else {
            return tableName;
        }
    }
779744
public static String canonicalNameToJvmName(String canonicalName) {
        boolean isArray = canonicalName.endsWith("[]");
        if (isArray) {
            String t = ""; // 计数，看上几维数组
            while (isArray) {
                canonicalName = canonicalName.substring(0, canonicalName.length() - 2);
                t += "[";
                isArray = canonicalName.endsWith("[]");
            }
            if ("boolean".equals(canonicalName)) {
                canonicalName = t + "Z";
            } else if ("byte".equals(canonicalName)) {
                canonicalName = t + "B";
            } else if ("char".equals(canonicalName)) {
                canonicalName = t + "C";
            } else if ("double".equals(canonicalName)) {
                canonicalName = t + "D";
            } else if ("float".equals(canonicalName)) {
                canonicalName = t + "F";
            } else if ("int".equals(canonicalName)) {
                canonicalName = t + "I";
            } else if ("long".equals(canonicalName)) {
                canonicalName = t + "J";
            } else if ("short".equals(canonicalName)) {
                canonicalName = t + "S";
            } else {
                canonicalName = t + "L" + canonicalName + ";";
            }
        }
        return canonicalName;
    }