Class ColumnMetaData
- java.lang.Object
-
- io.debezium.connector.postgresql.connection.pgoutput.ColumnMetaData
-
@Immutable public class ColumnMetaData extends Object
Defines the relational column mapping for a table.- Author:
- Gunnar Morling, Chris Cranford
-
-
Field Summary
Fields Modifier and Type Field Description private StringcolumnNameprivate ObjectdefaultValueprivate booleanhasDefaultValueprivate booleankeyprivate intlengthprivate booleanoptionalprivate PostgresTypepostgresTypeprivate intscaleprivate StringtypeName
-
Constructor Summary
Constructors Constructor Description ColumnMetaData(String columnName, PostgresType postgresType, boolean key, boolean optional, boolean hasDefaultValue, Object defaultValue, int typeModifier)Create a metadata structure representing a column.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetColumnName()ObjectgetDefaultValue()intgetLength()PostgresTypegetPostgresType()intgetScale()StringgetTypeName()booleanhasDefaultValue()booleanisKey()booleanisOptional()
-
-
-
Field Detail
-
columnName
private final String columnName
-
postgresType
private final PostgresType postgresType
-
key
private final boolean key
-
optional
private final boolean optional
-
hasDefaultValue
private final boolean hasDefaultValue
-
defaultValue
private final Object defaultValue
-
length
private final int length
-
scale
private final int scale
-
typeName
private final String typeName
-
-
Constructor Detail
-
ColumnMetaData
ColumnMetaData(String columnName, PostgresType postgresType, boolean key, boolean optional, boolean hasDefaultValue, Object defaultValue, int typeModifier)
Create a metadata structure representing a column.- Parameters:
columnName- name of the column; must not be nullpostgresType- postgres database type; must not be nullkey-trueif column is part of the primary key,falseotherwiseoptional-trueif the column is considered optional,falseotherwisehasDefaultValue-trueif the column has a default value specified,falseotherwisedefaultValue- the parsed default value for the columntypeModifier- the attribute type modifier
-
-
Method Detail
-
getColumnName
public String getColumnName()
-
getPostgresType
public PostgresType getPostgresType()
-
isKey
public boolean isKey()
-
isOptional
public boolean isOptional()
-
hasDefaultValue
public boolean hasDefaultValue()
-
getDefaultValue
public Object getDefaultValue()
-
getLength
public int getLength()
-
getScale
public int getScale()
-
getTypeName
public String getTypeName()
-
-