Class ColumnDefWithLength
- java.lang.Object
-
- com.zendesk.maxwell.schema.columndef.ColumnDef
-
- com.zendesk.maxwell.schema.columndef.ColumnDefWithLength
-
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
DateTimeColumnDef,TimeColumnDef
public abstract class ColumnDefWithLength extends ColumnDef
-
-
Field Summary
Fields Modifier and Type Field Description protected static ThreadLocal<StringBuilder>threadLocalBuilder
-
Constructor Summary
Constructors Modifier Constructor Description protectedColumnDefWithLength(String name, String type, short pos, Long columnLength)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected static StringappendFractionalSeconds(String value, int nanos, Long columnLength)ObjectasJSON(Object value, MaxwellOutputConfig config)booleanequals(Object o)protected abstract StringformatValue(Object value, MaxwellOutputConfig config)LonggetColumnLength()inthashCode()StringtoSQL(Object value)ColumnDefWithLengthwithColumnLength(long length)-
Methods inherited from class com.zendesk.maxwell.schema.columndef.ColumnDef
asJSON, build, clone, cloneSelfAndSet, getInterner, getName, getPos, getType, unalias_type, withName, withPos
-
-
-
-
Field Detail
-
threadLocalBuilder
protected static ThreadLocal<StringBuilder> threadLocalBuilder
-
-
Method Detail
-
toSQL
public String toSQL(Object value) throws ColumnDefCastException
- Specified by:
toSQLin classColumnDef- Throws:
ColumnDefCastException
-
asJSON
public Object asJSON(Object value, MaxwellOutputConfig config) throws ColumnDefCastException
- Overrides:
asJSONin classColumnDef- Throws:
ColumnDefCastException
-
getColumnLength
public Long getColumnLength()
-
withColumnLength
public ColumnDefWithLength withColumnLength(long length)
-
formatValue
protected abstract String formatValue(Object value, MaxwellOutputConfig config) throws ColumnDefCastException
- Throws:
ColumnDefCastException
-
-