com.informix.lang

Class IfxTypes

  • java.lang.Object
    • com.informix.lang.IfxTypes


  • public class IfxTypes
    extends java.lang.Object
    The IfxTypes class contains final members for Informix data types.
    See Also:
    Types
    • Field Detail

      • IFX_TYPE_CHAR

        public static final short IFX_TYPE_CHAR
        The Informix SQLCHAR type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_SMALLINT

        public static final short IFX_TYPE_SMALLINT
        The Informix SQLSMINT type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_INT

        public static final short IFX_TYPE_INT
        The Informix SQLINT type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_FLOAT

        public static final short IFX_TYPE_FLOAT
        The Informix SQLFLOAT type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_SMFLOAT

        public static final short IFX_TYPE_SMFLOAT
        The Informix SQLSMFLOAT type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_DECIMAL

        public static final short IFX_TYPE_DECIMAL
        The Informix SQLDECIMAL type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_SERIAL

        public static final short IFX_TYPE_SERIAL
        The Informix SQLSERIAL type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_DATE

        public static final short IFX_TYPE_DATE
        The Informix SQLDATE type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_MONEY

        public static final short IFX_TYPE_MONEY
        The Informix SQLMONEY type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_NULL

        public static final short IFX_TYPE_NULL
        The Informix SQLNULL type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_DATETIME

        public static final short IFX_TYPE_DATETIME
        The Informix SQLDTIME type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_BYTE

        public static final short IFX_TYPE_BYTE
        The Informix SQLBYTES type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_TEXT

        public static final short IFX_TYPE_TEXT
        The Informix SQLTEXT type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_VARCHAR

        public static final short IFX_TYPE_VARCHAR
        The Informix SQLVCHAR type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_INTERVAL

        public static final short IFX_TYPE_INTERVAL
        The Informix SQLINTERVAL type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_NCHAR

        public static final short IFX_TYPE_NCHAR
        The Informix SQLNCHAR type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_NVCHAR

        public static final short IFX_TYPE_NVCHAR
        The Informix SQLNVCHAR type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_INT8

        public static final short IFX_TYPE_INT8
        The Informix SQLINT8 type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_SERIAL8

        public static final short IFX_TYPE_SERIAL8
        The Informix SQLSERIAL8 type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_SET

        public static final short IFX_TYPE_SET
        The Informix SQLSET type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_MULTISET

        public static final short IFX_TYPE_MULTISET
        The Informix SQLMULTISET type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_LIST

        public static final short IFX_TYPE_LIST
        The Informix SQLLIST type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_ROW

        public static final short IFX_TYPE_ROW
        The Informix SQLROW type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_COLLECTION

        public static final short IFX_TYPE_COLLECTION
        The Informix SQLCOLLECTION type as defined in the sqltypes.h file. Not supported by the JDBC driver.
        See Also:
        Constant Field Values
      • IFX_TYPE_ROWREF

        public static final short IFX_TYPE_ROWREF
        The Informix SQLROWREF type as defined in the sqltypes.h file. Not supported by the JDBC driver.
        See Also:
        Constant Field Values
      • IFX_TYPE_UDTVAR

        public static final short IFX_TYPE_UDTVAR
        The Informix SQLUDTVAR type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_UDTFIXED

        public static final short IFX_TYPE_UDTFIXED
        The Informix SQLUDTFIXED type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_REFSER8

        public static final short IFX_TYPE_REFSER8
        The Informix SQLREFSER8 type. Not supported by the JDBC driver.
        See Also:
        Constant Field Values
      • IFX_TYPE_LVARCHAR

        public static final short IFX_TYPE_LVARCHAR
        The Informix SQLLVARCHAR type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_SENDRECV

        public static final short IFX_TYPE_SENDRECV
        The Informix SQLSENDRECV type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_BOOL

        public static final short IFX_TYPE_BOOL
        The Informix SQLBOOL type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_IMPEXP

        public static final short IFX_TYPE_IMPEXP
        The Informix SQLIMPEXP type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_IMPEXPBIN

        public static final short IFX_TYPE_IMPEXPBIN
        The Informix SQLIMPEXPBIN type as defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_SQLUDRDEFAULT

        public static final short IFX_TYPE_SQLUDRDEFAULT
        The Informix SQLUDRDEFAULT type as defined in the sqltypes.h file. Not supported by the JDBC driver.
        See Also:
        Constant Field Values
      • IFX_TYPE_UNKNOWN

        public static final short IFX_TYPE_UNKNOWN
        Unknown type.
        See Also:
        Constant Field Values
      • IFX_TYPE_MAX

        public static final short IFX_TYPE_MAX
        Maximum number for Informix types.
        See Also:
        Constant Field Values
      • IFX_TYPE_CLOB

        public static final short IFX_TYPE_CLOB
        Informix CLOB type. This type is an Informix JDBC driver specific type and is not associated with any Informix database type defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_BLOB

        public static final short IFX_TYPE_BLOB
        Informix BLOB type. This type is an Informix JDBC driver specific type and is not associated with any Informix database type defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_BIT_NOTNULLABLE

        public static final short IFX_BIT_NOTNULLABLE
        A bit mask to indicate that a particular column does not allow null values.
        See Also:
        Constant Field Values
      • IFX_BIT_DISTINCT

        public static final short IFX_BIT_DISTINCT
        A bit mask to indicate that a particular column is a distinct type.
        See Also:
        Constant Field Values
      • IFX_BIT_NAMEDROW

        public static final short IFX_BIT_NAMEDROW
        A bit mask to indicate that a particular column is a named row type.
        See Also:
        Constant Field Values
      • IFX_BIT_COLLCLIENT

        public static final short IFX_BIT_COLLCLIENT
        A bit mask to indicate that a particular host variable is a client collection.
        See Also:
        Constant Field Values
      • IFX_BIT_DBOOLEAN

        public static final short IFX_BIT_DBOOLEAN
        A bit mask to indicate that a particular column is a distinct of a boolean.
        See Also:
        Constant Field Values
      • IFX_XID_IDSSECURITYLABEL

        public static final short IFX_XID_IDSSECURITYLABEL
        See Also:
        Constant Field Values
      • IFX_XID_IDSCOVERINGINFO

        public static final short IFX_XID_IDSCOVERINGINFO
        See Also:
        Constant Field Values
      • IFX_XNAME_BLOB

        public static final java.lang.String IFX_XNAME_BLOB
        Extended type name for BLOB types.
        See Also:
        Constant Field Values
      • IFX_XNAME_CLOB

        public static final java.lang.String IFX_XNAME_CLOB
        Extended type name for BLOB types.
        See Also:
        Constant Field Values
      • IFX_XNAME_BOOL

        public static final java.lang.String IFX_XNAME_BOOL
        Extended type name for boolean types.
        See Also:
        Constant Field Values
      • IFX_XNAME_LVARCHAR

        public static final java.lang.String IFX_XNAME_LVARCHAR
        Extended type name for lvarchar types.
        See Also:
        Constant Field Values
    • Method Detail

      • FromIfxToJDBC2Type

        public static int FromIfxToJDBC2Type(int ifxType)
        Converts Informix types to JDBC types with JDK 1.2.
        Parameters:
        ifxType - The Informix SQL type.
        Returns:
        Corresponding JDBC type from java.sql.Types. If no mapping is found, Types.OTHER is returned.
      • FromIfxToJDBCType

        public static int FromIfxToJDBCType(int ifxType)
        Converts Informix types to JDBC types.
        Parameters:
        ifxType - The Informix SQL type.
        Returns:
        Corresponding JDBC type from java.sql.Types. If no mapping is found, Types.OTHER is returned.
      • fromJavaToIfxTypeName

        public static java.lang.String fromJavaToIfxTypeName(java.lang.Class<?> clazz)
      • FromJDBCToIfxType

        public static int FromJDBCToIfxType(int jdbcType)
        Converts JDBC types to Informix types.
        Parameters:
        jdbcType - The JDBC type as defined in java.sql.Types.
        Returns:
        Corresponding Informix type. If no mapping is found, IFX_TYPE_UNKNOWN is returned.
      • FromJavaToIfxType

        public static int FromJavaToIfxType(java.lang.String javaClassName)
        Converts Java class types (host variable types) to Informix types.
        Parameters:
        javaClassName - The fully qualified java object class name; for example, java.lang.String.
        Returns:
        Corresponding Informix type. If no mapping is found, IFX_TYPE_UNKNOWN is returned.
      • FromIfxTypeToJava

        public static java.lang.String FromIfxTypeToJava(int ifxType)
        Converts Informix types to JDBC types.
        Parameters:
        ifxType - The Informix SQL type.
        Returns:
        Corresponding JDBC type from java.sql.Types. If no mapping is found, "unknown" is returned.
      • IfxTypeToName

        public static java.lang.String IfxTypeToName(int ifxType)
        Converts Informix types to type names.
        Parameters:
        ifxType - The Informix SQL type.
        Returns:
        Corresponding Informix type name. If ifxType cannot be found, "unknown" is returned.
      • IfxExTypeToName

        public static java.lang.String IfxExTypeToName(int ifxExtType)
      • JDBCTypeToName

        public static java.lang.String JDBCTypeToName(int jdbcType)
        Converts JDBC types to type names.
        Parameters:
        jdbcType - The JDBC type as defined in java.sql.Types.
        Returns:
        Corresponding JDCB type name. If an invalid JDBC type is passed in, "unknown" is returned.
      • FromIfxNameToIfxType

        public static int FromIfxNameToIfxType(java.lang.String name)
        Converts Informix SQL type names to Informix types.
        Parameters:
        name - The Informix SQL type name in a string; for example, CHAR.
        Returns:
        Corresponding Informix type. If no mapping is found, Types.OTHER is returned.
      • IfxTypeToDecDigits

        public static int IfxTypeToDecDigits(int ifxType,
                                             int ifxExType,
                                             int colLen)
        Returns the number of Decimal Digits for an Informix type
        Parameters:
        ifxType - The Informix SQL type.
        ifxExType - The Informix Extended type.
        colLen - The column length to use for variable length types
        Returns:
        Number of decimal digits in the type, or 0 if unknown.
      • IfxTypeToRightDecimal

        public static int IfxTypeToRightDecimal(int ifxType,
                                                int ifxExType,
                                                int colLen)
        Returns the number of Decimal Digits to the right of the decimal for an Informix type
        Parameters:
        ifxType - The Informix SQL type.
        ifxExType - The Informix Extended type.
        colLen - The column length to use for variable length types
        Returns:
        Number of decimal digits to the right of the decimal, or 0 if unkown/not applicable.
      • IsFloatTypes

        public static boolean IsFloatTypes(int ifxType)
        Tests if the given type is a float type (either IFX_TYPE_FLOAT or IFX_TYPE_SMFLOAT).
        Parameters:
        ifxType - The Informix SQL type.
        Returns:
        True if the type is FLOAT or SMALLFLOAT, or else false.
      • isString

        public static boolean isString(int ifxType)
        Tests if the given type is a string type (IFX_TYPE_CHAR, IFX_TYPE_VARCHAR, IFX_TYPE_NCHAR, IFX_TYPE_NVCHAR, or IFX_TYPE_LVARCHAR.
        Parameters:
        ifxType - The Informix SQL type.
        Returns:
        True if the type is a String type, or else false.
      • isUDT

        public static boolean isUDT(int ifxType)
        Tests if the given type is a user-defined type, which includes opaque types, lvarchars, and booleans.
        Parameters:
        ifxType - The Informix SQL type.
        Returns:
        True if the type is LVARCHAR, BOOLEAN, or user-defined, or else false.
      • isCollection

        public static boolean isCollection(int ifxType)
        Tests if the given type is a collection type.
        Parameters:
        ifxType - The Informix SQL type.
        Returns:
        True if the type is a Collection type, or else false.
      • isComplexType

        public static boolean isComplexType(int ifxType)
        Tests if the given type is a complex type.
        Parameters:
        ifxType - The Informix SQL type.
        Returns:
        True if the type is a Complex type, or else false.
      • getIfxTypeForExtendedTypes

        public static int getIfxTypeForExtendedTypes(int extendedId)