-
大小: 4.33MB文件类型: .zip金币: 1下载: 0 次发布日期: 2023-09-16
- 语言: Java
- 标签:
资源简介
java操作MySQL数据库所必需的一个连接器,下载完毕后将mysql-connector-java-8.0.17.jar导入到项目中即可,并且add as library,就可以使用jar包实现与MySQL的连接
代码片段和文件信息
/*
* Copyright (c) 2002 2018 Oracle and/or its affiliates. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 2.0 as published by the
* Free Software Foundation.
*
* This program is also distributed with certain software (including but not
* limited to OpenSSL) that is licensed under separate terms as designated in a
* particular file or component or in included license documentation. The
* authors of MySQL hereby grant you an additional permission to link the
* program and your derivative works with the separately licensed software that
* they have included with MySQL.
*
* Without limiting anything contained in the foregoing this file which is
* part of MySQL Connector/J is also subject to the Universal FOSS Exception
* version 1.0 a copy of which can be found at
* http://oss.oracle.com/licenses/universal-foss-exception.
*
* This program is distributed in the hope that it will be useful but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License version 2.0
* for more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not write to the Free Software Foundation Inc.
* 51 Franklin St Fifth Floor Boston MA 02110-1301 USA
*/
package documentation;
import java.util.HashMap;
import java.util.Map;
import java.util.TreeMap;
import com.mysql.cj.exceptions.MysqlErrorNumbers;
/**
* Creates xml file describing mapping of MySQL error #‘s to SQL92 and X/Open states.
*/
public class ErrorMappingsDocGenerator {
public static void main(String[] args) throws Exception {
dumpSqlStatesMappingsAsxml();
}
public static void dumpSqlStatesMappingsAsxml() throws Exception {
TreeMap allErrorNumbers = new TreeMap<>();
Mapject String> mysqlErrorNumbersToNames = new HashMap<>();
// Integer errorNumber = null;
//
// First create a list of all ‘known‘ error numbers that are mapped.
//
for (Integer errorNumber : MysqlErrorNumbers.mysqlToSql99State.keySet()) {
allErrorNumbers.put(errorNumber errorNumber);
}
//
// Now create a list of the actual MySQL error numbers we know about
//
java.lang.reflect.Field[] possibleFields = MysqlErrorNumbers.class.getDeclaredFields();
for (int i = 0; i < possibleFields.length; i++) {
String fieldName = possibleFields[i].getName();
if (fieldName.startsWith(“ER_“)) {
mysqlErrorNumbersToNames.put(possibleFields[i].get(null) fieldName);
}
}
System.out.println(““);
for (Integer errorNumber : allErrorNumbers.keySet()) {
String sql92State = MysqlErrorNumbers.mysqlToSql99(err
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-06-07 09:49 mysql-connector-java-8.0.17\
文件 89517 2019-06-07 09:49 mysql-connector-java-8.0.17\build.xm
文件 262785 2019-06-07 09:49 mysql-connector-java-8.0.17\CHANGES
文件 183 2019-06-07 09:49 mysql-connector-java-8.0.17\INFO_BIN
文件 135 2019-06-07 09:49 mysql-connector-java-8.0.17\INFO_SRC
文件 97187 2019-06-07 09:49 mysql-connector-java-8.0.17\LICENSE
文件 2321813 2019-06-07 09:49 mysql-connector-java-8.0.17\mysql-connector-java-8.0.17.jar
文件 1265 2019-06-07 09:49 mysql-connector-java-8.0.17\README
目录 0 2019-06-07 09:49 mysql-connector-java-8.0.17\src\
目录 0 2019-06-07 09:49 mysql-connector-java-8.0.17\src\build\
目录 0 2019-06-07 09:49 mysql-connector-java-8.0.17\src\build\java\
目录 0 2019-06-07 09:49 mysql-connector-java-8.0.17\src\build\java\documentation\
文件 3371 2019-06-07 09:49 mysql-connector-java-8.0.17\src\build\java\documentation\ErrorMappingsDocGenerator.java
文件 5722 2019-06-07 09:49 mysql-connector-java-8.0.17\src\build\java\documentation\PropertiesDocGenerator.java
目录 0 2019-06-07 09:49 mysql-connector-java-8.0.17\src\build\java\instrumentation\
文件 6057 2019-06-07 09:49 mysql-connector-java-8.0.17\src\build\java\instrumentation\AddMethods.java
文件 13152 2019-06-07 09:49 mysql-connector-java-8.0.17\src\build\java\instrumentation\CommonChecks.java
文件 39985 2019-06-07 09:49 mysql-connector-java-8.0.17\src\build\java\instrumentation\TranslateExceptions.java
目录 0 2019-06-07 09:49 mysql-connector-java-8.0.17\src\build\misc\
目录 0 2019-06-07 09:49 mysql-connector-java-8.0.17\src\build\misc\debian.in\
文件 275 2019-06-07 09:49 mysql-connector-java-8.0.17\src\build\misc\debian.in\changelog
文件 2 2019-06-07 09:49 mysql-connector-java-8.0.17\src\build\misc\debian.in\compat
文件 467 2019-06-07 09:49 mysql-connector-java-8.0.17\src\build\misc\debian.in\control
文件 365 2019-06-07 09:49 mysql-connector-java-8.0.17\src\build\misc\debian.in\copyright
文件 522 2019-06-07 09:49 mysql-connector-java-8.0.17\src\build\misc\debian.in\install
文件 2710 2019-06-07 09:49 mysql-connector-java-8.0.17\src\build\misc\debian.in\rules
目录 0 2019-06-07 09:49 mysql-connector-java-8.0.17\src\build\misc\debian.in\source\
文件 12 2019-06-07 09:49 mysql-connector-java-8.0.17\src\build\misc\debian.in\source\format
文件 73 2019-06-07 09:49 mysql-connector-java-8.0.17\src\build\misc\debian.in\watch
文件 1080 2019-06-07 09:49 mysql-connector-java-8.0.17\src\build\misc\pom.xm
文件 1644 2019-06-07 09:49 mysql-connector-java-8.0.17\src\build\misc\Product.wxs
............此处省略728个文件信息
相关资源
- mysql-connector-java-8.0.11
- mysql-connector-java-5.1.38.zip
- mysql-connector-java-5.1.40
- mysql-connector-java-5.1.39.zip
- mysql-connector-java-8.0.17.jar
- mysql-connector-java-5.1.18.rar
- mysql-connector-java-8.0.20.zip
- mysql-connector-java-5.1.46-bin.jar和mysql-co
- Java实现Excel导入数据库有完整的sql。
- mysql-connector-java-5.0.8
- mysql-connector-java-5.1.38.tar.gz
-
msba
se.jarmssqlserver.jarmsutil.jarmysql-co - mysql-connector-java
- mysql-connector-java-5.1.6.zip
- java_JDBC_5.17_驱动包 (mysql-connector-ja
- mysql-connector-java-5.1.40-bin.jar
- mysql-connector-java-5.1.36-bin
- mysql-connector-java-5.1.23-bin.jar
- mysql5.0 jdbc 驱动
- mysql-connector-java-5.1.10-bin.jar
- mysql-connector-java-3.1.7-bin.jar
- mysql-connector-java-5.0.8-bin.jar
- mysql-connector-java-5.1.7 jar包
- mysql-connector-java-5.1.37-bin jar包
- mysql-connector-java-5.1.46.jar
- myaql5.0.8驱动程序jar包:mysql-connector
- mysql驱动文件mysql-connector-java-5.0.4-bi
- mysql-connector-java-5.1.12-bin.jar
- commons-dbcp-1.4.jar、commons-pool-1.5.6.jar、
- mysql-connector-java-3.1.10-bin.jar
评论
共有 条评论