Package net.snowflake.client.jdbc

## Enum SnowflakeType

- java.lang.Object
- - java.lang.Enum<SnowflakeType>
  - - net.snowflake.client.jdbc.SnowflakeType

All Implemented Interfaces:
  `Serializable`, `Comparable<SnowflakeType>`

    public enum SnowflakeType
    extends Enum<SnowflakeType>

Type converters

### Nested Class Summary

Nested Classes
`static class` `SnowflakeType.JavaDataType`
`static class` `SnowflakeType.JavaSQLType`

### Enum Constant Summary

Enum Constants
`ANY`
`ARRAY`
`BINARY`
`BOOLEAN`
`CHAR`
`DATE`
`DECFLOAT`
`FIXED`
`GEOGRAPHY`
`GEOMETRY`
`INTEGER`
`INTERVAL_DAY_TIME`
`INTERVAL_YEAR_MONTH`
`MAP`
`OBJECT`
`REAL`
`TEXT`
`TIME`
`TIMESTAMP`
`TIMESTAMP_LTZ`
`TIMESTAMP_NTZ`
`TIMESTAMP_TZ`
`VARIANT`
`VECTOR`

### Field Summary

Fields
`static String` `BINARY_CLASS_NAME`
`static String` `DATE_OR_TIME_FORMAT_PATTERN`
`static String` `TIME_FORMAT_PATTERN`
`static String` `TIMESTAMP_FORMAT_PATTERN`
`static String` `TIMESTAMP_FORMAT_TZ_PATTERN`

### Method Summary

All Methods Static Methods Concrete Methods Deprecated Methods
`static int` `convertStringToType​(String typeName)` Converts text of data type (returned from SQL query) into Types type, represented by an int
`static String` `escapeForCSV​(String value)`
`static SnowflakeType` `fromString​(String name)`
`static SnowflakeType.JavaDataType` `getJavaType​(SnowflakeType type)` Deprecated.
`static SnowflakeType.JavaDataType` `getJavaType​(SnowflakeType type, boolean isStructuredType)`
`static boolean` `isJavaTypeSigned​(int type)`
`static String` `javaTypeToClassName​(int type)`
`static SnowflakeType` `javaTypeToSFType​(int javaType, SFBaseSession session)`
`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
`static SnowflakeType` `valueOf​(String name)` Returns the enum constant of this type with the specified name.
`static SnowflakeType[]` `values()` Returns an array containing the constants of this enum type, in the order they are declared.

### Methods inherited from class java.lang.Enum

`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

### Enum Constant Detail

#### ANY

    public static final SnowflakeType ANY

#### ARRAY

    public static final SnowflakeType ARRAY

#### BINARY

    public static final SnowflakeType BINARY

#### BOOLEAN

    public static final SnowflakeType BOOLEAN

#### CHAR

    public static final SnowflakeType CHAR

#### DATE

    public static final SnowflakeType DATE

#### DECFLOAT

    public static final SnowflakeType DECFLOAT

#### FIXED

    public static final SnowflakeType FIXED

#### INTEGER

    public static final SnowflakeType INTEGER

#### OBJECT

    public static final SnowflakeType OBJECT

#### MAP

    public static final SnowflakeType MAP

#### REAL

    public static final SnowflakeType REAL

#### TEXT

    public static final SnowflakeType TEXT

#### TIME

    public static final SnowflakeType TIME

#### TIMESTAMP

    public static final SnowflakeType TIMESTAMP

#### TIMESTAMP_LTZ

    public static final SnowflakeType TIMESTAMP_LTZ

#### TIMESTAMP_NTZ

    public static final SnowflakeType TIMESTAMP_NTZ

#### TIMESTAMP_TZ

    public static final SnowflakeType TIMESTAMP_TZ

#### INTERVAL_YEAR_MONTH

    public static final SnowflakeType INTERVAL_YEAR_MONTH

#### INTERVAL_DAY_TIME

    public static final SnowflakeType INTERVAL_DAY_TIME

#### VARIANT

    public static final SnowflakeType VARIANT

#### GEOGRAPHY

    public static final SnowflakeType GEOGRAPHY

#### GEOMETRY

    public static final SnowflakeType GEOMETRY

#### VECTOR

    public static final SnowflakeType VECTOR

### Field Detail

#### DATE_OR_TIME_FORMAT_PATTERN

    public static final String DATE_OR_TIME_FORMAT_PATTERN

See Also:
  Constant Field Values

#### TIMESTAMP_FORMAT_PATTERN

    public static final String TIMESTAMP_FORMAT_PATTERN

See Also:
  Constant Field Values

#### TIMESTAMP_FORMAT_TZ_PATTERN

    public static final String TIMESTAMP_FORMAT_TZ_PATTERN

See Also:
  Constant Field Values

#### TIME_FORMAT_PATTERN

    public static final String TIME_FORMAT_PATTERN

See Also:
  Constant Field Values

#### BINARY_CLASS_NAME

    public static final String BINARY_CLASS_NAME

### 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

#### fromString

    public static SnowflakeType fromString​(String name)

#### getJavaType

    @Deprecated
    public static SnowflakeType.JavaDataType getJavaType​(SnowflakeType type)

Deprecated.

#### getJavaType

    @SnowflakeJdbcInternalApi
    public static SnowflakeType.JavaDataType getJavaType​(SnowflakeType type,
                                                         boolean isStructuredType)

#### 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)

#### javaTypeToSFType

    public static SnowflakeType javaTypeToSFType​(int javaType,
                                                 SFBaseSession session)
                                          throws SnowflakeSQLException

Throws:
  `SnowflakeSQLException`

#### javaTypeToClassName

    public static String javaTypeToClassName​(int type)
                                      throws SQLException

Throws:
  `SQLException`

#### isJavaTypeSigned

    public static boolean isJavaTypeSigned​(int type)