Enum ColumnType
- All Implemented Interfaces:
Serializable, Comparable<ColumnType>, java.lang.constant.Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic ClassclassFromJavaType(int type) Permit to know java result class according to java.sql.Types.static ColumnTypefromServer(int typeValue, int charsetNumber) Convert server Type to server type.static StringgetClassName(ColumnType type, int len, boolean signed, boolean binary, Options options) Get class name.static StringgetColumnTypeName(ColumnType type, long len, long charLen, boolean signed, boolean binary) Get columnTypeName.intshortgetType()static booleanisNumeric(ColumnType type) Is type numeric.static ColumnTypetoServer(int javaType) Convert javatype to ColumnType.static ColumnTypeReturns the enum constant of this type with the specified name.static ColumnType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
OLDDECIMAL
-
TINYINT
-
SMALLINT
-
INTEGER
-
FLOAT
-
DOUBLE
-
NULL
-
TIMESTAMP
-
BIGINT
-
MEDIUMINT
-
DATE
-
TIME
-
DATETIME
-
YEAR
-
NEWDATE
-
VARCHAR
-
BIT
-
JSON
-
DECIMAL
-
ENUM
-
SET
-
TINYBLOB
-
MEDIUMBLOB
-
LONGBLOB
-
BLOB
-
VARSTRING
-
STRING
-
GEOMETRY
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
classFromJavaType
Permit to know java result class according to java.sql.Types.- Parameters:
type- java.sql.Type value- Returns:
- Class name.
-
isNumeric
Is type numeric.- Parameters:
type- mariadb type- Returns:
- true if type is numeric
-
getColumnTypeName
public static String getColumnTypeName(ColumnType type, long len, long charLen, boolean signed, boolean binary) Get columnTypeName.- Parameters:
type- typelen- lencharLen- character lengthsigned- signedbinary- binary- Returns:
- type
-
fromServer
Convert server Type to server type.- Parameters:
typeValue- type valuecharsetNumber- charset- Returns:
- MariaDb type
-
toServer
Convert javatype to ColumnType.- Parameters:
javaType- javatype value- Returns:
- mariaDb type value
-
getClassName
public static String getClassName(ColumnType type, int len, boolean signed, boolean binary, Options options) Get class name.- Parameters:
type- typelen- lensigned- signedbinary- binaryoptions- options- Returns:
- class name
-
getClassName
-
getSqlType
public int getSqlType() -
getTypeName
-
getType
public short getType() -
getJavaTypeName
-