public class MySqlUtils extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static Charset |
ASCII |
static Charset |
BIG5 |
static Charset |
GBK |
static Charset |
UTF16 |
static Charset |
UTF32 |
static Charset |
UTF8 |
| 构造器和说明 |
|---|
MySqlUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
big5(String hex) |
static String |
buildKillQuerySql(Connection connection,
SQLException error) |
static XAConnection |
createXAConnection(Driver driver,
Connection physicalConn) |
static BigDecimal |
decimal(BigDecimal value,
int precision,
int scale) |
static String |
gbk(String hex) |
static Class |
getCommunicationsExceptionClass() |
static String |
getCreateTableScript(Connection conn) |
static String |
getCreateTableScript(Connection conn,
boolean sorted,
boolean simplify) |
static Long |
getId(Object conn) |
static long |
getLastPacketReceivedTimeMs(Connection conn) |
static List<String> |
getTableDDL(Connection conn,
List<String> tables) |
static boolean |
isBuiltinDataType(String dataType) |
static boolean |
isKeyword(String name) |
static boolean |
isNumber(String str) |
static boolean |
isSupportParseDateformat(String str) |
static void |
loadDataTypes(Set<String> dataTypes) |
static Date |
parseDate(String str,
TimeZone timeZone) |
static java.time.ZonedDateTime |
parseDateTime(byte[] str,
int off,
int len,
java.time.ZoneId zoneId) |
static long |
parseMillis(byte[] str,
int off,
int len,
TimeZone timeZone) |
static long |
parseMillis(byte[] str,
TimeZone timeZone) |
static TimeZone |
parseTimeZone(String str) |
static List<String> |
showTables(Connection conn) |
static DateFormat |
toJavaFormat(String fmt) |
static DateFormat |
toJavaFormat(String fmt,
TimeZone timeZone) |
static String |
utf16(String hex) |
static String |
utf32(String hex) |
static String |
utf8(String hex) |
public static final Charset GBK
public static final Charset BIG5
public static final Charset UTF8
public static final Charset UTF16
public static final Charset UTF32
public static final Charset ASCII
public static XAConnection createXAConnection(Driver driver, Connection physicalConn) throws SQLException
SQLExceptionpublic static String buildKillQuerySql(Connection connection, SQLException error) throws SQLException
SQLExceptionpublic static boolean isKeyword(String name)
public static boolean isBuiltinDataType(String dataType)
public static List<String> showTables(Connection conn) throws SQLException
SQLExceptionpublic static List<String> getTableDDL(Connection conn, List<String> tables) throws SQLException
SQLExceptionpublic static String getCreateTableScript(Connection conn) throws SQLException
SQLExceptionpublic static String getCreateTableScript(Connection conn, boolean sorted, boolean simplify) throws SQLException
SQLExceptionpublic static long getLastPacketReceivedTimeMs(Connection conn) throws SQLException
SQLExceptionpublic static Class getCommunicationsExceptionClass()
public static BigDecimal decimal(BigDecimal value, int precision, int scale)
public static boolean isNumber(String str)
public static DateFormat toJavaFormat(String fmt, TimeZone timeZone)
public static DateFormat toJavaFormat(String fmt)
public static long parseMillis(byte[] str,
TimeZone timeZone)
public static long parseMillis(byte[] str,
int off,
int len,
TimeZone timeZone)
public static java.time.ZonedDateTime parseDateTime(byte[] str,
int off,
int len,
java.time.ZoneId zoneId)
public static boolean isSupportParseDateformat(String str)
Copyright © 2013–2023. All rights reserved.