Package org.mariadb.jdbc.internal
Enum Class ColumnType
- All Implemented Interfaces:
Serializable
,Comparable<ColumnType>
,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
private final int
private final String
private final short
(package private) static final ColumnType[]
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ColumnType
(int mariadbType, int javaType, String javaTypeName, String className) -
Method Summary
Modifier and TypeMethodDescriptionstatic Class
classFromJavaType
(int type) Permit to know java result class according to java.sql.Types.static ColumnType
fromServer
(int typeValue, int charsetNumber) Convert server Type to server type.static String
getClassName
(ColumnType type, int len, boolean signed, boolean binary, Options options) Get class name.static String
getColumnTypeName
(ColumnType type, long len, boolean signed, boolean binary) Get columnTypeName.int
short
getType()
static boolean
isNumeric
(ColumnType type) Is type numeric.static ColumnType
toServer
(int javaType) Convert javatype to ColumnType.static ColumnType
Returns the enum constant of this class with the specified name.static ColumnType[]
values()
Returns an array containing the constants of this enum class, 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
-
-
Field Details
-
typeMap
-
mariadbType
private final short mariadbType -
javaType
private final int javaType -
javaTypeName
-
className
-
-
Constructor Details
-
ColumnType
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class 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
Get columnTypeName.- Parameters:
type
- typelen
- lensigned
- 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
-