Enum SnowflakeType

    • Method Detail

      • values

        public static SnowflakeType[] 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 (SnowflakeType c : SnowflakeType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static SnowflakeType 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
      • convertStringToType

        public static int convertStringToType​(String typeName)
        Converts text of data type (returned from SQL query) into Types type, represented by an int
        Parameters:
        typeName - type name
        Returns:
        int representation of type
      • lexicalValue

        public static String lexicalValue​(Object o,
                                          DateFormat dateFormat,
                                          DateFormat timeFormat,
                                          DateFormat timestampFormat,
                                          DateFormat timestampTzFormat)
        Returns a lexical value of an object that is suitable for Snowflake import serialization
        Parameters:
        o - Java object representing value in Snowflake.
        dateFormat - java.sql.Date or java.sqlTime format
        timeFormat - java.sql.Time format
        timestampFormat - first part of java.sql.Timestamp format
        timestampTzFormat - last part of java.sql.Timestamp format
        Returns:
        String representation of it that can be used for creating a load file
      • escapeForCSV

        public static String escapeForCSV​(String value)
      • isJavaTypeSigned

        public static boolean isJavaTypeSigned​(int type)