Class OceanBaseUtils
- java.lang.Object
-
- org.apache.flink.cdc.connectors.oceanbase.sink.OceanBaseUtils
-
public class OceanBaseUtils extends Object
Utilities for conversion from source table to OceanBase table.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOceanBaseUtils.CdcDataTypeTransformerTransforms CDCDataTypeto OceanBase data type.
-
Field Summary
Fields Modifier and Type Field Description static StringBIGINTstatic StringBINARYstatic StringBOOLEANstatic StringCHARstatic StringDATEstatic StringDATETIMEstatic StringDECIMALstatic StringDOUBLEstatic StringFLOATstatic StringINTstatic StringJSONstatic StringLONGBLOBstatic intMAX_CHAR_SIZEMax size of char type of OceanBase.static intMAX_VARBINARY_SIZEThe max VARBINARY column length is 1048576.static intMAX_VARCHAR_SIZEMax size of varchar type of OceanBase.static StringSMALLINTstatic StringSTRINGstatic StringTEXTstatic StringTIMEstatic StringTIMESTAMPstatic StringTINYINTstatic StringVARBINARYstatic StringVARCHAR
-
Constructor Summary
Constructors Constructor Description OceanBaseUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidtoOceanBaseDataType(Column cdcColumn, boolean isPrimaryKeys, OceanBaseColumn.Builder builder)Convert CDC data type to OceanBase data type.static OceanBaseTabletoOceanBaseTable(TableId tableId, Schema schema)Convert a source table toOceanBaseTable.
-
-
-
Field Detail
-
BOOLEAN
public static final String BOOLEAN
- See Also:
- Constant Field Values
-
TINYINT
public static final String TINYINT
- See Also:
- Constant Field Values
-
SMALLINT
public static final String SMALLINT
- See Also:
- Constant Field Values
-
INT
public static final String INT
- See Also:
- Constant Field Values
-
BIGINT
public static final String BIGINT
- See Also:
- Constant Field Values
-
BINARY
public static final String BINARY
- See Also:
- Constant Field Values
-
VARBINARY
public static final String VARBINARY
- See Also:
- Constant Field Values
-
FLOAT
public static final String FLOAT
- See Also:
- Constant Field Values
-
DOUBLE
public static final String DOUBLE
- See Also:
- Constant Field Values
-
DECIMAL
public static final String DECIMAL
- See Also:
- Constant Field Values
-
CHAR
public static final String CHAR
- See Also:
- Constant Field Values
-
VARCHAR
public static final String VARCHAR
- See Also:
- Constant Field Values
-
STRING
public static final String STRING
- See Also:
- Constant Field Values
-
DATE
public static final String DATE
- See Also:
- Constant Field Values
-
DATETIME
public static final String DATETIME
- See Also:
- Constant Field Values
-
TIMESTAMP
public static final String TIMESTAMP
- See Also:
- Constant Field Values
-
TIME
public static final String TIME
- See Also:
- Constant Field Values
-
JSON
public static final String JSON
- See Also:
- Constant Field Values
-
TEXT
public static final String TEXT
- See Also:
- Constant Field Values
-
LONGBLOB
public static final String LONGBLOB
- See Also:
- Constant Field Values
-
MAX_CHAR_SIZE
public static final int MAX_CHAR_SIZE
Max size of char type of OceanBase.- See Also:
- Constant Field Values
-
MAX_VARCHAR_SIZE
public static final int MAX_VARCHAR_SIZE
Max size of varchar type of OceanBase.- See Also:
- Constant Field Values
-
MAX_VARBINARY_SIZE
public static final int MAX_VARBINARY_SIZE
The max VARBINARY column length is 1048576.- See Also:
- Constant Field Values
-
-
Method Detail
-
toOceanBaseTable
public static OceanBaseTable toOceanBaseTable(TableId tableId, Schema schema)
Convert a source table toOceanBaseTable.
-
toOceanBaseDataType
public static void toOceanBaseDataType(Column cdcColumn, boolean isPrimaryKeys, OceanBaseColumn.Builder builder)
Convert CDC data type to OceanBase data type.
-
-