Package org.mariadb.jdbc.internal
Enum ColumnType
- java.lang.Object
-
- java.lang.Enum<ColumnType>
-
- org.mariadb.jdbc.internal.ColumnType
-
- All Implemented Interfaces:
Serializable
,Comparable<ColumnType>
public enum ColumnType extends Enum<ColumnType>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static 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.String
getClassName()
static String
getClassName(ColumnType type, int len, boolean signed, boolean binary, Options options)
Get class name.static String
getColumnTypeName(ColumnType type, long len, long charLen, boolean signed, boolean binary)
Get columnTypeName.String
getJavaTypeName()
int
getSqlType()
short
getType()
String
getTypeName()
static boolean
isNumeric(ColumnType type)
Is type numeric.static ColumnType
toServer(int javaType)
Convert javatype to ColumnType.static ColumnType
valueOf(String name)
Returns 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 Detail
-
OLDDECIMAL
public static final ColumnType OLDDECIMAL
-
TINYINT
public static final ColumnType TINYINT
-
SMALLINT
public static final ColumnType SMALLINT
-
INTEGER
public static final ColumnType INTEGER
-
FLOAT
public static final ColumnType FLOAT
-
DOUBLE
public static final ColumnType DOUBLE
-
NULL
public static final ColumnType NULL
-
TIMESTAMP
public static final ColumnType TIMESTAMP
-
BIGINT
public static final ColumnType BIGINT
-
MEDIUMINT
public static final ColumnType MEDIUMINT
-
DATE
public static final ColumnType DATE
-
TIME
public static final ColumnType TIME
-
DATETIME
public static final ColumnType DATETIME
-
YEAR
public static final ColumnType YEAR
-
NEWDATE
public static final ColumnType NEWDATE
-
VARCHAR
public static final ColumnType VARCHAR
-
BIT
public static final ColumnType BIT
-
JSON
public static final ColumnType JSON
-
DECIMAL
public static final ColumnType DECIMAL
-
ENUM
public static final ColumnType ENUM
-
SET
public static final ColumnType SET
-
TINYBLOB
public static final ColumnType TINYBLOB
-
MEDIUMBLOB
public static final ColumnType MEDIUMBLOB
-
LONGBLOB
public static final ColumnType LONGBLOB
-
BLOB
public static final ColumnType BLOB
-
VARSTRING
public static final ColumnType VARSTRING
-
STRING
public static final ColumnType STRING
-
GEOMETRY
public static final ColumnType GEOMETRY
-
-
Method Detail
-
values
public static ColumnType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ColumnType c : ColumnType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ColumnType valueOf(String name)
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
public static Class classFromJavaType(int type)
Permit to know java result class according to java.sql.Types.- Parameters:
type
- java.sql.Type value- Returns:
- Class name.
-
isNumeric
public static boolean isNumeric(ColumnType type)
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
public static ColumnType fromServer(int typeValue, int charsetNumber)
Convert server Type to server type.- Parameters:
typeValue
- type valuecharsetNumber
- charset- Returns:
- MariaDb type
-
toServer
public static ColumnType toServer(int javaType)
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
public String getClassName()
-
getSqlType
public int getSqlType()
-
getTypeName
public String getTypeName()
-
getType
public short getType()
-
getJavaTypeName
public String getJavaTypeName()
-
-