Package org.postgresql.util
Enum PSQLState
- All Implemented Interfaces:
Serializable
,Comparable<PSQLState>
,java.lang.constant.Constable
This class is used for holding SQLState codes.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionAfter a connection has been established, it went bad.The server rejected our connection attempt.We could establish a connection with the server for unknown reasons.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. -
Method Summary
Modifier and TypeMethodDescriptiongetState()
static boolean
isConnectionError
(@Nullable String psqlState) static PSQLState
Returns the enum constant of this type with the specified name.static PSQLState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN_STATE
-
TOO_MANY_RESULTS
-
NO_DATA
-
INVALID_PARAMETER_TYPE
-
CONNECTION_UNABLE_TO_CONNECT
We could establish a connection with the server for unknown reasons. Could be a network problem. -
CONNECTION_DOES_NOT_EXIST
-
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
After a connection has been established, it went bad. -
CONNECTION_FAILURE_DURING_TRANSACTION
-
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
-
NOT_IMPLEMENTED
-
DATA_ERROR
-
STRING_DATA_RIGHT_TRUNCATION
-
NUMERIC_VALUE_OUT_OF_RANGE
-
BAD_DATETIME_FORMAT
-
DATETIME_OVERFLOW
-
DIVISION_BY_ZERO
-
MOST_SPECIFIC_TYPE_DOES_NOT_MATCH
-
INVALID_PARAMETER_VALUE
-
NOT_NULL_VIOLATION
-
FOREIGN_KEY_VIOLATION
-
UNIQUE_VIOLATION
-
CHECK_VIOLATION
-
EXCLUSION_VIOLATION
-
INVALID_CURSOR_STATE
-
TRANSACTION_STATE_INVALID
-
ACTIVE_SQL_TRANSACTION
-
NO_ACTIVE_SQL_TRANSACTION
-
IN_FAILED_SQL_TRANSACTION
-
INVALID_SQL_STATEMENT_NAME
-
INVALID_AUTHORIZATION_SPECIFICATION
-
INVALID_PASSWORD
-
INVALID_TRANSACTION_TERMINATION
-
STATEMENT_NOT_ALLOWED_IN_FUNCTION_CALL
-
INVALID_SAVEPOINT_SPECIFICATION
-
SERIALIZATION_FAILURE
-
DEADLOCK_DETECTED
-
SYNTAX_ERROR
-
UNDEFINED_COLUMN
-
UNDEFINED_OBJECT
-
WRONG_OBJECT_TYPE
-
NUMERIC_CONSTANT_OUT_OF_RANGE
-
DATA_TYPE_MISMATCH
-
UNDEFINED_FUNCTION
-
INVALID_NAME
-
DATATYPE_MISMATCH
-
CANNOT_COERCE
-
UNDEFINED_TABLE
-
OUT_OF_MEMORY
-
OBJECT_NOT_IN_STATE
-
OBJECT_IN_USE
-
QUERY_CANCELED
-
SYSTEM_ERROR
-
IO_ERROR
-
UNEXPECTED_ERROR
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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 nameNullPointerException
- if the argument is null
-
getState
-
isConnectionError
-