Package io.debezium.connector.postgresql
Class PostgresType
java.lang.Object
io.debezium.connector.postgresql.PostgresType
A class that binds together a PostgresSQL OID, JDBC type id and the string name of the type.
The array types contain link to their element type.
- Author:
- Jiri Pechanec
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PostgresTypeprivate final intprivate final intprivate final Stringprivate final intprivate final PostgresTypeprivate final org.postgresql.core.TypeInfostatic final PostgresType -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePostgresType(String name, int oid, int jdbcId, int modifiers, org.postgresql.core.TypeInfo typeInfo, List<String> enumValues, PostgresType parentType, PostgresType elementType) privatePostgresType(String name, int oid, int jdbcId, org.postgresql.core.TypeInfo typeInfo, List<String> enumValues, PostgresType parentType, PostgresType elementType) -
Method Summary
Modifier and TypeMethodDescriptionbooleanintintintgetName()intgetOid()org.postgresql.core.TypeInfoGet the underlying postgres type information objectinthashCode()booleanbooleanbooleanThe type system allows for the creation of user defined types (UDTs) which can be based on any existing type.intlength(int modifier) intscale(int modifier) toString()
-
Field Details
-
UNKNOWN
-
name
-
oid
private final int oid -
jdbcId
private final int jdbcId -
parentType
-
elementType
-
typeInfo
private final org.postgresql.core.TypeInfo typeInfo -
modifiers
private final int modifiers -
enumValues
-
-
Constructor Details
-
PostgresType
private PostgresType(String name, int oid, int jdbcId, org.postgresql.core.TypeInfo typeInfo, List<String> enumValues, PostgresType parentType, PostgresType elementType) -
PostgresType
private PostgresType(String name, int oid, int jdbcId, int modifiers, org.postgresql.core.TypeInfo typeInfo, List<String> enumValues, PostgresType parentType, PostgresType elementType)
-
-
Method Details
-
isArrayType
public boolean isArrayType()- Returns:
- true if this type is an array
-
isRootType
public boolean isRootType()The type system allows for the creation of user defined types (UDTs) which can be based on any existing type. When a type does not extend another type, it is considered to be a base or root type in the type hierarchy.- Returns:
- true if this type is a base/root type
-
isEnumType
public boolean isEnumType()- Returns:
- true if this type is an enum type
-
getName
- Returns:
- symbolic name of the type
-
getOid
public int getOid()- Returns:
- PostgreSQL OID of this type
-
getJdbcId
public int getJdbcId()- Returns:
- JDBC id of the type as reported by JDBC metadata
-
getElementType
- Returns:
- the type of element in arrays or null for primitive types
-
getParentType
- Returns:
- the parent postgres type this type is based upon
-
getRootType
- Returns:
- the postgres type at the top/root level for this type's hierarchy
-
getEnumValues
-
getDefaultLength
public int getDefaultLength()- Returns:
- the default length of the type
-
getDefaultScale
public int getDefaultScale()- Returns:
- the default scale of the type
-
length
public int length(int modifier) - Parameters:
modifier- - type modifier coming from decoder- Returns:
- length of the type based on the modifier
-
getTypeInfo
public org.postgresql.core.TypeInfo getTypeInfo()Get the underlying postgres type information object- Returns:
- the type information object; may be null
-
scale
public int scale(int modifier) - Parameters:
modifier- - type modifier coming from decoder- Returns:
- scale of the type based on the modifier
-
hashCode
public int hashCode() -
equals
-
toString
-