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 protected
ColumnDefWithLength(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 String
appendFractionalSeconds(String value, int nanos, Long columnLength)
Object
asJSON(Object value, MaxwellOutputConfig config)
boolean
equals(Object o)
protected abstract String
formatValue(Object value, MaxwellOutputConfig config)
Long
getColumnLength()
int
hashCode()
String
toSQL(Object value)
ColumnDefWithLength
withColumnLength(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:
toSQL
in classColumnDef
- Throws:
ColumnDefCastException
-
asJSON
public Object asJSON(Object value, MaxwellOutputConfig config) throws ColumnDefCastException
- Overrides:
asJSON
in 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
-
-