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
-
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 int
Get 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 ColumnEditor
editor()
Obtain an column definition editor that can be used to define a column.Get the list of values associated with the enumboolean
Determine whether this column's has a default valueboolean
Determine whether this column's values are automatically incremented by the database.boolean
Determine whether this column's values are generated by the database.boolean
Determine whether this column is optional.default boolean
Determine whether this column is required.int
jdbcType()
Get theJDBC type
for this columnint
length()
Get the maximum length of this column's values.name()
Get the name of the column.int
Get the database native type for this columnint
position()
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 boolean
Determine 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 type
for 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 sets
or 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:
true
if it is optional, orfalse
otherwise- See Also:
-
isRequired
default boolean isRequired()Determine whether this column is required. This is equivalent to calling!isOptional()
.- Returns:
true
if it is required (not optional), orfalse
otherwise- See Also:
-
isAutoIncremented
boolean isAutoIncremented()Determine whether this column's values are automatically incremented by the database.- Returns:
true
if the values are auto-incremented, orfalse
otherwise
-
isGenerated
boolean isGenerated()Determine whether this column's values are generated by the database.- Returns:
true
if the values are generated, orfalse
otherwise
-
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:
true
if the default value was provided, orfalse
otherwise
-
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:
compareTo
in 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:
true
if a character set applies the column's type, orfalse
otherwise
-