Package io.debezium.relational
Interface Column
- All Superinterfaces:
Comparable<Column>
- All Known Implementing Classes:
ColumnImpl
An immutable definition of a column.
- Author:
- Randall Hauch
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionGet the database-specific name of the character set used by this column.comment()Get the comment of the column.default intGet the database-specific complete expression defining the column's default value.edit()Obtain an editor that contains the same information as this column definition.static ColumnEditoreditor()Obtain an column definition editor that can be used to define a column.Get the list of values associated with the enumbooleanDetermine whether this column's has a default valuebooleanDetermine whether this column's values are automatically incremented by the database.booleanDetermine whether this column's values are generated by the database.booleanDetermine whether this column is optional.default booleanDetermine whether this column is required.intjdbcType()Get theJDBC typefor this columnintlength()Get the maximum length of this column's values.name()Get the name of the column.intGet the database native type for this columnintposition()Get the position of the column in the table.scale()Get the scale of the column.Get the database-specific complete expression defining the column's data type, including dimensions, length, precision, character sets, constraints, etc.typeName()Get the database-specific name of the column's data type.default booleanDetermine whether this column has atypeName()orjdbcType()to which a character set applies.
-
Field Details
-
UNSET_INT_VALUE
static final int UNSET_INT_VALUE- See Also:
-
-
Method Details
-
editor
Obtain an column definition editor that can be used to define a column.- Returns:
- the editor; never null
-
name
String name()Get the name of the column.- Returns:
- the column name; never null
-
position
int position()Get the position of the column in the table.- Returns:
- the 1-based position
-
jdbcType
int jdbcType()Get theJDBC typefor this column- Returns:
- the type constant
-
nativeType
int nativeType()Get the database native type for this column- Returns:
- a type constant for the specific database
-
typeName
String typeName()Get the database-specific name of the column's data type.- Returns:
- the name of the type
-
typeExpression
String typeExpression()Get the database-specific complete expression defining the column's data type, including dimensions, length, precision, character sets, constraints, etc.- Returns:
- the complete type expression
-
charsetName
String charsetName()Get the database-specific name of the character set used by this column.- Returns:
- the database-specific character set name, or null if the column's data type doesn't
use character setsor no character set is specified
-
length
int length()Get the maximum length of this column's values. For numeric columns, this represents the precision.- Returns:
- the length of the column
-
scale
Get the scale of the column.- Returns:
- the scale if it applies to this type
-
isOptional
boolean isOptional()Determine whether this column is optional.- Returns:
trueif it is optional, orfalseotherwise- See Also:
-
isRequired
default boolean isRequired()Determine whether this column is required. This is equivalent to calling!isOptional().- Returns:
trueif it is required (not optional), orfalseotherwise- See Also:
-
isAutoIncremented
boolean isAutoIncremented()Determine whether this column's values are automatically incremented by the database.- Returns:
trueif the values are auto-incremented, orfalseotherwise
-
isGenerated
boolean isGenerated()Determine whether this column's values are generated by the database.- Returns:
trueif the values are generated, orfalseotherwise
-
defaultValueExpression
Get the database-specific complete expression defining the column's default value.- Returns:
- the complete type expression
-
hasDefaultValue
boolean hasDefaultValue()Determine whether this column's has a default value- Returns:
trueif the default value was provided, orfalseotherwise
-
enumValues
Get the list of values associated with the enum- Returns:
- the list of enum values
-
comment
String comment()Get the comment of the column.- Returns:
- the column comment; may be null if not set
-
compareTo
- Specified by:
compareToin interfaceComparable<Column>
-
edit
ColumnEditor edit()Obtain an editor that contains the same information as this column definition.- Returns:
- the editor; never null
-
typeUsesCharset
default boolean typeUsesCharset()Determine whether this column has atypeName()orjdbcType()to which a character set applies.- Returns:
trueif a character set applies the column's type, orfalseotherwise
-