com.amazon.redshift.util

## Enum RedshiftState

- java.lang.Object
- - java.lang.Enum<RedshiftState>
  - - com.amazon.redshift.util.RedshiftState

All Implemented Interfaces:
  Serializable, Comparable<RedshiftState>

    public enum RedshiftState
    extends Enum<RedshiftState>

This class is used for holding SQLState codes.

### Enum Constant Summary

Enum Constants
Enum Constant and Description
`ACTIVE_SQL_TRANSACTION`
`BAD_DATETIME_FORMAT`
`CANNOT_COERCE`
`CHECK_VIOLATION`
`COMMUNICATION_ERROR`
`CONNECTION_DOES_NOT_EXIST`
`CONNECTION_FAILURE` After a connection has been established, it went bad.
`CONNECTION_FAILURE_DURING_TRANSACTION`
`CONNECTION_REJECTED` The server rejected our connection attempt.
`CONNECTION_UNABLE_TO_CONNECT` We could establish a connection with the server for unknown reasons.
`DATA_ERROR`
`DATA_TYPE_MISMATCH`
`DATATYPE_MISMATCH`
`DATETIME_OVERFLOW`
`DEADLOCK_DETECTED`
`DIVISION_BY_ZERO`
`EXCLUSION_VIOLATION`
`FOREIGN_KEY_VIOLATION`
`IN_FAILED_SQL_TRANSACTION`
`INVALID_AUTHORIZATION_SPECIFICATION`
`INVALID_CURSOR_STATE`
`INVALID_NAME`
`INVALID_PARAMETER_TYPE`
`INVALID_PARAMETER_VALUE`
`INVALID_SAVEPOINT_SPECIFICATION`
`INVALID_SQL_STATEMENT_NAME`
`INVALID_TRANSACTION_TERMINATION`
`IO_ERROR`
`MOST_SPECIFIC_TYPE_DOES_NOT_MATCH`
`NO_ACTIVE_SQL_TRANSACTION`
`NO_DATA`
`NOT_IMPLEMENTED`
`NOT_NULL_VIOLATION`
`NUMERIC_CONSTANT_OUT_OF_RANGE`
`NUMERIC_VALUE_OUT_OF_RANGE`
`OBJECT_IN_USE`
`OBJECT_NOT_IN_STATE`
`OUT_OF_MEMORY`
`PROTOCOL_VIOLATION` The server sent us a response the driver was not prepared for and is either bizarre datastream corruption, a driver bug, or a protocol violation on the server's part.
`QUERY_CANCELED`
`STATEMENT_NOT_ALLOWED_IN_FUNCTION_CALL`
`STRING_DATA_RIGHT_TRUNCATION`
`SYNTAX_ERROR`
`SYSTEM_ERROR`
`TOO_MANY_RESULTS`
`TRANSACTION_STATE_INVALID`
`UNDEFINED_COLUMN`
`UNDEFINED_FUNCTION`
`UNDEFINED_OBJECT`
`UNDEFINED_TABLE`
`UNEXPECTED_ERROR`
`UNIQUE_VIOLATION`
`UNKNOWN_STATE`
`WRONG_OBJECT_TYPE`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`String` `getState()`
`static boolean` `isConnectionError(String psqlState)`
`static RedshiftState` `valueOf(String name)` Returns the enum constant of this type with the specified name.
`static RedshiftState[]` `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

#### UNKNOWN_STATE

    public static final RedshiftState UNKNOWN_STATE

#### TOO_MANY_RESULTS

    public static final RedshiftState TOO_MANY_RESULTS

#### NO_DATA

    public static final RedshiftState NO_DATA

#### INVALID_PARAMETER_TYPE

    public static final RedshiftState INVALID_PARAMETER_TYPE

#### CONNECTION_UNABLE_TO_CONNECT

    public static final RedshiftState CONNECTION_UNABLE_TO_CONNECT

We could establish a connection with the server for unknown reasons. Could be a network problem.

#### CONNECTION_DOES_NOT_EXIST

    public static final RedshiftState CONNECTION_DOES_NOT_EXIST

#### CONNECTION_REJECTED

    public static final RedshiftState CONNECTION_REJECTED

The server rejected our connection attempt. Usually an authentication failure, but could be a configuration error like asking for a SSL connection with a server that wasn't built with SSL support.

#### CONNECTION_FAILURE

    public static final RedshiftState CONNECTION_FAILURE

After a connection has been established, it went bad.

#### CONNECTION_FAILURE_DURING_TRANSACTION

    public static final RedshiftState CONNECTION_FAILURE_DURING_TRANSACTION

#### PROTOCOL_VIOLATION

    public static final RedshiftState PROTOCOL_VIOLATION

The server sent us a response the driver was not prepared for and is either bizarre datastream corruption, a driver bug, or a protocol violation on the server's part.

#### COMMUNICATION_ERROR

    public static final RedshiftState COMMUNICATION_ERROR

#### NOT_IMPLEMENTED

    public static final RedshiftState NOT_IMPLEMENTED

#### DATA_ERROR

    public static final RedshiftState DATA_ERROR

#### STRING_DATA_RIGHT_TRUNCATION

    public static final RedshiftState STRING_DATA_RIGHT_TRUNCATION

#### NUMERIC_VALUE_OUT_OF_RANGE

    public static final RedshiftState NUMERIC_VALUE_OUT_OF_RANGE

#### BAD_DATETIME_FORMAT

    public static final RedshiftState BAD_DATETIME_FORMAT

#### DATETIME_OVERFLOW

    public static final RedshiftState DATETIME_OVERFLOW

#### DIVISION_BY_ZERO

    public static final RedshiftState DIVISION_BY_ZERO

#### MOST_SPECIFIC_TYPE_DOES_NOT_MATCH

    public static final RedshiftState MOST_SPECIFIC_TYPE_DOES_NOT_MATCH

#### INVALID_PARAMETER_VALUE

    public static final RedshiftState INVALID_PARAMETER_VALUE

#### NOT_NULL_VIOLATION

    public static final RedshiftState NOT_NULL_VIOLATION

#### FOREIGN_KEY_VIOLATION

    public static final RedshiftState FOREIGN_KEY_VIOLATION

#### UNIQUE_VIOLATION

    public static final RedshiftState UNIQUE_VIOLATION

#### CHECK_VIOLATION

    public static final RedshiftState CHECK_VIOLATION

#### EXCLUSION_VIOLATION

    public static final RedshiftState EXCLUSION_VIOLATION

#### INVALID_CURSOR_STATE

    public static final RedshiftState INVALID_CURSOR_STATE

#### TRANSACTION_STATE_INVALID

    public static final RedshiftState TRANSACTION_STATE_INVALID

#### ACTIVE_SQL_TRANSACTION

    public static final RedshiftState ACTIVE_SQL_TRANSACTION

#### NO_ACTIVE_SQL_TRANSACTION

    public static final RedshiftState NO_ACTIVE_SQL_TRANSACTION

#### IN_FAILED_SQL_TRANSACTION

    public static final RedshiftState IN_FAILED_SQL_TRANSACTION

#### INVALID_SQL_STATEMENT_NAME

    public static final RedshiftState INVALID_SQL_STATEMENT_NAME

#### INVALID_AUTHORIZATION_SPECIFICATION

    public static final RedshiftState INVALID_AUTHORIZATION_SPECIFICATION

#### INVALID_TRANSACTION_TERMINATION

    public static final RedshiftState INVALID_TRANSACTION_TERMINATION

#### STATEMENT_NOT_ALLOWED_IN_FUNCTION_CALL

    public static final RedshiftState STATEMENT_NOT_ALLOWED_IN_FUNCTION_CALL

#### INVALID_SAVEPOINT_SPECIFICATION

    public static final RedshiftState INVALID_SAVEPOINT_SPECIFICATION

#### DEADLOCK_DETECTED

    public static final RedshiftState DEADLOCK_DETECTED

#### SYNTAX_ERROR

    public static final RedshiftState SYNTAX_ERROR

#### UNDEFINED_COLUMN

    public static final RedshiftState UNDEFINED_COLUMN

#### UNDEFINED_OBJECT

    public static final RedshiftState UNDEFINED_OBJECT

#### WRONG_OBJECT_TYPE

    public static final RedshiftState WRONG_OBJECT_TYPE

#### NUMERIC_CONSTANT_OUT_OF_RANGE

    public static final RedshiftState NUMERIC_CONSTANT_OUT_OF_RANGE

#### DATA_TYPE_MISMATCH

    public static final RedshiftState DATA_TYPE_MISMATCH

#### UNDEFINED_FUNCTION

    public static final RedshiftState UNDEFINED_FUNCTION

#### INVALID_NAME

    public static final RedshiftState INVALID_NAME

#### DATATYPE_MISMATCH

    public static final RedshiftState DATATYPE_MISMATCH

#### CANNOT_COERCE

    public static final RedshiftState CANNOT_COERCE

#### UNDEFINED_TABLE

    public static final RedshiftState UNDEFINED_TABLE

#### OUT_OF_MEMORY

    public static final RedshiftState OUT_OF_MEMORY

#### OBJECT_NOT_IN_STATE

    public static final RedshiftState OBJECT_NOT_IN_STATE

#### OBJECT_IN_USE

    public static final RedshiftState OBJECT_IN_USE

#### QUERY_CANCELED

    public static final RedshiftState QUERY_CANCELED

#### SYSTEM_ERROR

    public static final RedshiftState SYSTEM_ERROR

#### IO_ERROR

    public static final RedshiftState IO_ERROR

#### UNEXPECTED_ERROR

    public static final RedshiftState UNEXPECTED_ERROR

### Method Detail

#### values

    public static RedshiftState[] 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 (RedshiftState c : RedshiftState.values())
        System.out.println(c);

Returns:
  an array containing the constants of this enum type, in the order they are declared

#### valueOf

    public static RedshiftState 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

#### getState

    public String getState()

#### isConnectionError

    public static boolean isConnectionError(String psqlState)