Enum ColumnType

    • 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 name
        NullPointerException - 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 - type
        len - len
        charLen - character length
        signed - signed
        binary - binary
        Returns:
        type
      • fromServer

        public static ColumnType fromServer​(int typeValue,
                                            int charsetNumber)
        Convert server Type to server type.
        Parameters:
        typeValue - type value
        charsetNumber - 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 - type
        len - len
        signed - signed
        binary - binary
        options - options
        Returns:
        class name
      • getClassName

        public String getClassName()
      • getSqlType

        public int getSqlType()
      • getTypeName

        public String getTypeName()
      • getType

        public short getType()
      • getJavaTypeName

        public String getJavaTypeName()