Enum Class PostgresqlObjectId
- All Implemented Interfaces:
PostgresTypeIdentifier, Type, Serializable, Comparable<PostgresqlObjectId>, java.lang.constant.Constable
public enum PostgresqlObjectId
extends Enum<PostgresqlObjectId>
implements Type, PostgresTypeIdentifier
Object IDs for well know PostgreSQL data types.
Extension Object IDs that are provided by Postgres extensions such as PostGIS are not constants of this enumeration and must be looked up from pg_type.
Lightweight PostgresTypeIdentifier identifier returning Object.class when calling getJavaType().
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>Nested classes/interfaces inherited from interface Type
Type.InferredType -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe bit object id.The bit array object id.The bool object id.The bool array object id.The box object id.The box array object id.The bpchar object id.The bpchar array object id.The bytea object id.They bytea array object id.The char object id.The char array object id.The circle object idThe circle array object idThe date object id.The date array object id.The float4 object id.The float4 array object id.The float8 object id.The float8 array object id.The inet object id.The inet array object id.The int2 object id.The int2 array object id.The int4 object id.The int4 array object id.The int8 object id.The int8 array object id.The interval object id.The interval array object id.The JSON object id.The JSON array object id.The JSONB array object id.The JSONB array object id.The line object id.The line array object id.The line segment object id.The line segment array object id.The money object id.The money array object id.The name object id.The name array object id.The numberic object id.The numeric array object id.The oid object id.The oid array object id.The path object id.The path array object id.The point object id.The point array object id.the polygon object id.the polygon array object id.The ref cursor object id.The ref cursor array object id.The text object id.The text array object id.The time object id.The time array object id.The timestamp object id.The timestamp array object id.The timestamptz object id.The timestamptz array object id.The timetz object id.The timetz array object id.UNKNOWN type PostgreSQL will sometimes return this type an example might be select 'hello' as foo newer versions return TEXT but some older versions will return UNKNOWNThe unspecified object id.The UUID object id.The UUID array object id.The varbit object id.The varbit array object id.The varchar object id.The varchar array object id.The void object id.The XML object id.The XML Array object id. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic PostgresqlObjectIdfrom(PostgresTypeIdentifier dataType) Class<?> getName()intReturns the object id represented by each return value.static booleanisValid(int objectId) Returns if theobjectIdis a known and validobjectId.static inttoInt(long oid) static intstatic longtoLong(int oid) static PostgresqlObjectIdvalueOf(int objectId) Returns thePostgresqlObjectIdmatching a given object id.static PostgresqlObjectIdReturns thePostgresqlObjectIdmatching a givenR2DBC type.static PostgresqlObjectIdReturns the enum constant of this class with the specified name.static PostgresqlObjectId[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BIT
The bit object id. -
BIT_ARRAY
The bit array object id. -
BOOL
The bool object id. -
BOOL_ARRAY
The bool array object id. -
BOX
The box object id. -
BOX_ARRAY
The box array object id. -
BPCHAR
The bpchar object id. -
BPCHAR_ARRAY
The bpchar array object id. -
BYTEA
The bytea object id. -
BYTEA_ARRAY
They bytea array object id. -
CHAR
The char object id. -
CHAR_ARRAY
The char array object id. -
CIRCLE
The circle object id -
CIRCLE_ARRAY
The circle array object id -
DATE
The date object id. -
DATE_ARRAY
The date array object id. -
FLOAT4
The float4 object id. -
FLOAT4_ARRAY
The float4 array object id. -
FLOAT8
The float8 object id. -
FLOAT8_ARRAY
The float8 array object id. -
INET
The inet object id. -
INET_ARRAY
The inet array object id. -
INT2
The int2 object id. -
INT2_ARRAY
The int2 array object id. -
INT4
The int4 object id. -
INT4_ARRAY
The int4 array object id. -
INT8
The int8 object id. -
INT8_ARRAY
The int8 array object id. -
INTERVAL
The interval object id. -
INTERVAL_ARRAY
The interval array object id. -
JSON
The JSON object id. -
JSON_ARRAY
The JSON array object id. -
JSONB
The JSONB array object id. -
JSONB_ARRAY
The JSONB array object id. -
LINE
The line object id. -
LINE_ARRAY
The line array object id. -
LSEG
The line segment object id. -
LSEG_ARRAY
The line segment array object id. -
MONEY
The money object id. -
MONEY_ARRAY
The money array object id. -
NAME
The name object id. -
NAME_ARRAY
The name array object id. -
NUMERIC
The numberic object id. -
NUMERIC_ARRAY
The numeric array object id. -
OID
The oid object id. -
OID_ARRAY
The oid array object id. -
PATH
The path object id. -
PATH_ARRAY
The path array object id. -
POINT
The point object id. -
POINT_ARRAY
The point array object id. -
POLYGON
the polygon object id. -
POLYGON_ARRAY
the polygon array object id. -
REF_CURSOR
The ref cursor object id. -
REF_CURSOR_ARRAY
The ref cursor array object id. -
TEXT
The text object id. -
TEXT_ARRAY
The text array object id. -
TIME
The time object id. -
TIME_ARRAY
The time array object id. -
TIMESTAMP
The timestamp object id. -
TIMESTAMP_ARRAY
The timestamp array object id. -
TIMESTAMPTZ
The timestamptz object id. -
TIMESTAMPTZ_ARRAY
The timestamptz array object id. -
TIMETZ
The timetz object id. -
TIMETZ_ARRAY
The timetz array object id. -
UNKNOWN
UNKNOWN type PostgreSQL will sometimes return this type an example might be select 'hello' as foo newer versions return TEXT but some older versions will return UNKNOWN -
UNSPECIFIED
The unspecified object id. This can be sent as a parameter type to tell the backend to infer the type -
UUID
The UUID object id. -
UUID_ARRAY
The UUID array object id. -
VARBIT
The varbit object id. -
VARBIT_ARRAY
The varbit array object id. -
VARCHAR
The varchar object id. -
VARCHAR_ARRAY
The varchar array object id. -
VOID
The void object id. -
XML
The XML object id. -
XML_ARRAY
The XML Array object id.
-
-
Field Details
-
OID_CACHE_SIZE
public static final int OID_CACHE_SIZE- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
from
-
isValid
public static boolean isValid(int objectId) Returns if theobjectIdis a known and validobjectId.- Parameters:
objectId- the object id to match- Returns:
trueif theobjectIdis a valid and known (static) objectId;falseotherwise.
-
valueOf
Returns thePostgresqlObjectIdmatching a given object id.- Parameters:
objectId- the object id to match- Returns:
- the
PostgresqlObjectIdmatching a given object id - Throws:
IllegalArgumentException- ifobjectIdisn't a valid object id
-
valueOf
Returns thePostgresqlObjectIdmatching a givenR2DBC type.- Parameters:
type- the R2DBC type- Returns:
- the
PostgresqlObjectId - Throws:
IllegalArgumentException- iftypeisnullUnsupportedOperationException- if the giventypeis not supported- Since:
- 0.9
-
getJavaType
- Specified by:
getJavaTypein interfaceType
-
getName
-
getObjectId
public int getObjectId()Returns the object id represented by each return value.- Specified by:
getObjectIdin interfacePostgresTypeIdentifier- Returns:
- the object id represented by each return value
-
toInt
-
toInt
public static int toInt(long oid) -
toLong
public static long toLong(int oid)
-