Package com.impossibl.postgres.api.jdbc
Enum PGType
- java.lang.Object
-
- java.lang.Enum<PGType>
-
- com.impossibl.postgres.api.jdbc.PGType
-
- All Implemented Interfaces:
PGAnyType
,Serializable
,Comparable<PGType>
,SQLType
public enum PGType extends Enum<PGType> implements PGAnyType
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACL_ITEM
BIT
BOOL
BOX
BPCHAR
BYTES
CHAR
CID
CIDR
CIRCLE
CITEXT
CSTRING
DATE
FLOAT4
FLOAT8
HSTORE
INET
INT2
INT4
INT8
INTERVAL
JSON
JSONB
LINE
LINE_SEGMENT
MACADDR
MACADDR8
MONEY
NAME
NUMERIC
OID
PATH
POINT
POLYGON
RECORD
TEXT
TID
TIME
TIME_WITH_TIMEZONE
TIMESTAMP
TIMESTAMP_WITH_TIMEZONE
UUID
VARBIT
VARCHAR
XID
XML
-
Field Summary
-
Fields inherited from interface com.impossibl.postgres.api.jdbc.PGAnyType
VENDOR_NAME
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<?>
getJavaType()
JDBCType
getMappedType()
String
getName()
Version
getRequiredVersion()
String
getVendor()
Integer
getVendorTypeNumber()
static PGType
valueOf(int oid)
Returns the enum constant of this type with the specified name.static PGType
valueOf(Type type)
Returns the enum constant of this type with the specified name.static PGType
valueOf(String name)
Returns the enum constant of this type with the specified name.static PGType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BOOL
public static final PGType BOOL
-
BYTES
public static final PGType BYTES
-
INT2
public static final PGType INT2
-
INT4
public static final PGType INT4
-
INT8
public static final PGType INT8
-
FLOAT4
public static final PGType FLOAT4
-
FLOAT8
public static final PGType FLOAT8
-
MONEY
public static final PGType MONEY
-
NUMERIC
public static final PGType NUMERIC
-
CHAR
public static final PGType CHAR
-
NAME
public static final PGType NAME
-
TEXT
public static final PGType TEXT
-
BPCHAR
public static final PGType BPCHAR
-
VARCHAR
public static final PGType VARCHAR
-
CSTRING
public static final PGType CSTRING
-
JSON
public static final PGType JSON
-
JSONB
public static final PGType JSONB
-
XML
public static final PGType XML
-
DATE
public static final PGType DATE
-
TIME
public static final PGType TIME
-
TIME_WITH_TIMEZONE
public static final PGType TIME_WITH_TIMEZONE
-
TIMESTAMP
public static final PGType TIMESTAMP
-
TIMESTAMP_WITH_TIMEZONE
public static final PGType TIMESTAMP_WITH_TIMEZONE
-
INTERVAL
public static final PGType INTERVAL
-
POINT
public static final PGType POINT
-
LINE_SEGMENT
public static final PGType LINE_SEGMENT
-
PATH
public static final PGType PATH
-
BOX
public static final PGType BOX
-
POLYGON
public static final PGType POLYGON
-
LINE
public static final PGType LINE
-
CIRCLE
public static final PGType CIRCLE
-
MACADDR
public static final PGType MACADDR
-
MACADDR8
public static final PGType MACADDR8
-
CIDR
public static final PGType CIDR
-
INET
public static final PGType INET
-
BIT
public static final PGType BIT
-
VARBIT
public static final PGType VARBIT
-
RECORD
public static final PGType RECORD
-
UUID
public static final PGType UUID
-
ACL_ITEM
public static final PGType ACL_ITEM
-
OID
public static final PGType OID
-
TID
public static final PGType TID
-
XID
public static final PGType XID
-
CID
public static final PGType CID
-
HSTORE
public static final PGType HSTORE
-
CITEXT
public static final PGType CITEXT
-
-
Method Detail
-
values
public static PGType[] 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 (PGType c : PGType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PGType 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 nameNullPointerException
- if the argument is null
-
getRequiredVersion
public Version getRequiredVersion()
- Specified by:
getRequiredVersion
in interfacePGAnyType
-
getVendorTypeNumber
public Integer getVendorTypeNumber()
- Specified by:
getVendorTypeNumber
in interfaceSQLType
-
getJavaType
public Class<?> getJavaType()
- Specified by:
getJavaType
in interfacePGAnyType
-
getMappedType
public JDBCType getMappedType()
-
valueOf
public static PGType valueOf(Type type)
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:
type
- 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
-
valueOf
public static PGType valueOf(int oid)
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:
oid
- 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
-
-